[Pkg-gnupg-commit] [libassuan] 97/437: (_assuan_cookie_write_data): Return the requested size to indicate successful operation. Fixes a spurious bug we previously fixed using fflush().
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 498be7bfa621513f2dccc36b1ad35efb50634b25
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jan 14 20:28:55 2004 +0000
(_assuan_cookie_write_data): Return the
requested size to indicate successful operation. Fixes a spurious
bug we previously fixed using fflush().
---
NEWS | 2 ++
src/ChangeLog | 11 +++++++++++
src/assuan-buffer.c | 7 ++++---
src/assuan.h | 2 +-
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/NEWS b/NEWS
index 46ec63b..550ca2b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
Noteworthy changes in version 0.6.3 (unreleased)
------------------------------------------------
+ * Fixed a data corruption bug in assuan_get_data_fp.
+
Noteworthy changes in version 0.6.2 (2003-12-18)
------------------------------------------------
diff --git a/src/ChangeLog b/src/ChangeLog
index 2b2f768..e31da5c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
+2004-01-14 Werner Koch <wk at gnupg.org>
+
+ * assuan-buffer.c (_assuan_cookie_write_data): Return the
+ requested size to indicate successful operation. Fixes a spurious
+ bug we previously fixed using fflush().
+
+2003-12-22 Werner Koch <wk at gnupg.org>
+
+ * assuan.h (ASSUAN_Locale_Problem): Added.
+ * assuan-errors.c (assuan_strerror): Ditto.
+
2003-12-18 Werner Koch <wk at gnupg.org>
* assuan.h (AssuanCommand): Clarified that these are now
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)
{
diff --git a/src/assuan.h b/src/assuan.h
index 9b72812..3da9b31 100644
--- a/src/assuan.h
+++ b/src/assuan.h
@@ -80,7 +80,7 @@ typedef enum
ASSUAN_Unexpected_Status = 124,
ASSUAN_Unexpected_Data = 125,
ASSUAN_Invalid_Status = 126,
-
+ ASSUAN_Locale_Problem = 127,
ASSUAN_Not_Confirmed = 128,
/* Warning: Don't use the rror codes, below they are deprecated. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list