aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-buffer.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-01-14 20:28:55 +0000
committerWerner Koch <[email protected]>2004-01-14 20:28:55 +0000
commit498be7bfa621513f2dccc36b1ad35efb50634b25 (patch)
tree949e2ad5d7541c1f25a4fecb835cf4875eb98cf7 /src/assuan-buffer.c
parentpost release version number bump. (diff)
downloadlibassuan-498be7bfa621513f2dccc36b1ad35efb50634b25.tar.gz
libassuan-498be7bfa621513f2dccc36b1ad35efb50634b25.zip
(_assuan_cookie_write_data): Return the
requested size to indicate successful operation. Fixes a spurious bug we previously fixed using fflush().
Diffstat (limited to 'src/assuan-buffer.c')
-rw-r--r--src/assuan-buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index 3684b3e..f049ba4 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -275,9 +275,10 @@ assuan_write_line (ASSUAN_CONTEXT ctx, const char *line)
/* Write out the data in buffer as datalines with line wrapping and
percent escaping. This fucntion is used for GNU's custom streams */
int
-_assuan_cookie_write_data (void *cookie, const char *buffer, size_t size)
+_assuan_cookie_write_data (void *cookie, const char *buffer, size_t orig_size)
{
ASSUAN_CONTEXT ctx = cookie;
+ size_t size = orig_size;
char *line;
size_t linelen;
@@ -344,12 +345,12 @@ _assuan_cookie_write_data (void *cookie, const char *buffer, size_t size)
}
ctx->outbound.data.linelen = linelen;
- return 0;
+ return (int)orig_size;
}
/* Write out any buffered data
- This fucntion is used for GNU's custom streams */
+ This function is used for GNU's custom streams */
int
_assuan_cookie_write_flush (void *cookie)
{