[Pkg-gnupg-commit] [libassuan] 122/437: Small API update and Windows fixes
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:32 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 7fe365f5e0995515ca95aee10768d9e18bd817c3
Author: Werner Koch <wk at gnupg.org>
Date: Wed Nov 24 16:13:59 2004 +0000
Small API update and Windows fixes
---
NEWS | 1 +
src/ChangeLog | 8 ++++++++
src/assuan-handler.c | 12 ++++++++----
src/assuan-socket.c | 10 +++++-----
src/assuan.h | 4 ++--
5 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/NEWS b/NEWS
index 1c41ecd..36d035e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
Noteworthy changes in version 0.6.8
------------------------------------------------
+ * assuan_write_status does now return an error code.
Noteworthy changes in version 0.6.7 (2004-09-27)
diff --git a/src/ChangeLog b/src/ChangeLog
index 7a39bbc..f373d4b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-24 Werner Koch <wk at g10code.com>
+
+ * assuan-socket.c[!_WIN32]: Fixed includes.
+
2004-11-23 Timo Schulz <twoaday at g10code.com>
* assuan-socket.c (_assuan_sock_connect): Get local port from
@@ -7,6 +11,10 @@
for a better portability.
(assuan-defs.h): Define DIRSEP_C.
+2004-11-19 Werner Koch <wk at g10code.com>
+
+ * assuan-handler.c (assuan_write_status): Return an error code.
+
2004-11-22 Timo Schulz <twoaday at g10code.com>
* assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index e9d7b07..7be48e6 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -684,15 +684,16 @@ assuan_set_okay_line (ASSUAN_CONTEXT ctx, const char *line)
-void
+assuan_error_t
assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
{
char buffer[256];
char *helpbuf;
size_t n;
+ assuan_error_t ae;
if ( !ctx || !keyword)
- return;
+ return ASSUAN_Invalid_Value;
if (!text)
text = "";
@@ -706,7 +707,7 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (buffer, " ");
strcat (buffer, text);
}
- assuan_write_line (ctx, buffer);
+ ae = assuan_write_line (ctx, buffer);
}
else if ( (helpbuf = xtrymalloc (n)) )
{
@@ -717,7 +718,10 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (helpbuf, " ");
strcat (helpbuf, text);
}
- assuan_write_line (ctx, helpbuf);
+ ae = assuan_write_line (ctx, helpbuf);
xfree (helpbuf);
}
+ else
+ ae = 0;
+ return ae;
}
diff --git a/src/assuan-socket.c b/src/assuan-socket.c
index 1ed92c0..078e2f3 100644
--- a/src/assuan-socket.c
+++ b/src/assuan-socket.c
@@ -18,14 +18,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include <config.h>
-#ifndef _WIN32
-#include <sys/socket.h>
-#else
#include <stdio.h>
-#include <io.h>
+#ifdef _WIN32
#include <windows.h>
-#include "assuan-defs.h"
+#include <io.h>
+#else
+#include <sys/socket.h>
#endif
+#include "assuan-defs.h"
int
_assuan_close (int fd)
diff --git a/src/assuan.h b/src/assuan.h
index 2b5637e..890f3b0 100644
--- a/src/assuan.h
+++ b/src/assuan.h
@@ -167,8 +167,8 @@ int assuan_get_active_fds (assuan_context_t ctx, int what,
FILE *assuan_get_data_fp (assuan_context_t ctx);
assuan_error_t assuan_set_okay_line (assuan_context_t ctx, const char *line);
-void assuan_write_status (assuan_context_t ctx,
- const char *keyword, const char *text);
+assuan_error_t assuan_write_status (assuan_context_t ctx,
+ const char *keyword, const char *text);
/* Negotiate a file descriptor. If LINE contains "FD=N", returns N
assuming a local file descriptor. If LINE contains "FD" reads a
--
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