diff options
author | Guy Harris <guy@alum.mit.edu> | 2006-03-19 20:39:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2006-03-19 20:39:49 +0000 |
commit | 624db0dc41ab9bad1bacbd95462d6dffa4afba61 (patch) | |
tree | 6547eb1030cccef51649142e2c373b2997b9426e | |
parent | 68a1def103457e88da9a4063233ca7476a35191e (diff) |
Fix pipe_read_bytes() to return the total number of bytes read, not just
the number of bytes read in the last read() call done.
svn path=/trunk/; revision=17675
-rw-r--r-- | capture_sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/capture_sync.c b/capture_sync.c index 631f870df6..3572023ad8 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -227,7 +227,7 @@ pipe_read_bytes(int pipe, char *bytes, int required) { /* EOF */ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "read from pipe %d: EOF (capture closed?)", pipe); - return newly; + return offset; } if (newly < 0) { /* error */ @@ -240,7 +240,7 @@ pipe_read_bytes(int pipe, char *bytes, int required) { offset += newly; } - return newly; + return offset; } /* convert header values (indicator and 4-byte length) */ |