[Pkg-gnupg-commit] [libassuan] 180/437: Again one of these last commits

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:40 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 9815596f64265cd4f87e2df374de23f54c26985e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 22 13:29:47 2006 +0000

    Again one of these last commits
---
 src/ChangeLog        |  2 +-
 src/assuan-handler.c | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 98b0f81..9767e15 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,6 @@
 2006-11-22  Werner Koch  <wk at g10code.com>
 
-	* assuan-handler.c (fun_cookie_write): New.
+	* assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
 	(assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
 
 2006-11-21  Werner Koch  <wk at g10code.com>
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index 44b655f..866db22 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -653,15 +653,21 @@ assuan_get_active_fds (assuan_context_t ctx, int what,
 }
 
 
-/* funopen uses a different prototype for the write fucntions.  We use
-   this wrapper here to fix it. */
+/* Two simple wrappers to make the expected function types match. */
 #ifdef HAVE_FUNOPEN
 static int
-fun_cookie_write (void *cookie, const char *buffer, int orig_size)
+fun1_cookie_write (void *cookie, const char *buffer, int orig_size)
 {
   return _assuan_cookie_write_data (cookie, buffer, orig_size);
 }
 #endif /*HAVE_FUNOPEN*/
+#ifdef HAVE_FOPENCOOKIE
+static ssize_t
+fun2_cookie_write (void *cookie, const char *buffer, size_t orig_size)
+{
+  return _assuan_cookie_write_data (cookie, buffer, orig_size);
+}
+#endif /*HAVE_FOPENCOOKIE*/
 
 /* Return a FP to be used for data output.  The FILE pointer is valid
    until the end of a handler.  So a close is not needed.  Assuan does
@@ -679,10 +685,10 @@ assuan_get_data_fp (assuan_context_t ctx)
     return ctx->outbound.data.fp;
   
 #ifdef HAVE_FUNOPEN
-  ctx->outbound.data.fp = funopen (ctx, 0, fun_cookie_write,
+  ctx->outbound.data.fp = funopen (ctx, 0, fun1_cookie_write,
 				   0, _assuan_cookie_write_flush);
 #else
-  ctx->outbound.data.fp = funopen (ctx, 0, _assuan_cookie_write_data,
+  ctx->outbound.data.fp = funopen (ctx, 0, fun2_cookie_write,
 				   0, _assuan_cookie_write_flush);
 #endif                                   
 

-- 
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