diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-02 20:27:45 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-02 20:27:45 +0000 |
commit | 1baa42d7946c42bbefe8367e7472ec305ae1d337 (patch) | |
tree | 264766ee358671ac5f9c6d48967ffc1becd207c9 | |
parent | ebf8bded3f539c61a5a99e1d43214d1b0228396a (diff) |
make 'cat /proc/zaptel/1' not fail with only ztdummy loaded (issue
#5069)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@756 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; } |