diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-02 20:26:02 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-02 20:26:02 +0000 |
commit | 0f9a1d5d56ecdce6c0a79c09fb3290040fe9a488 (patch) | |
tree | 21fbfec2ea154a514c4b46750d92802ba29a81cf | |
parent | 8a06c15d68ce9b57a62ea70673dd21857fb7d36c (diff) |
make 'cat /proc/zaptel/1' not fail with ztdummy loaded (issue #5069)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@755 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | zaptel.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -571,6 +571,11 @@ static int zaptel_proc_read(char *page, char **start, off_t off, int count, int } } } + if ( len <= off ) /* If everything printed so far is before beginning of request */ + { + off -= len; + len = 0; + } *start = page + off; return len; } |