diff options
author | Werner Koch <[email protected]> | 2004-11-24 16:13:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-11-24 16:13:59 +0000 |
commit | 7fe365f5e0995515ca95aee10768d9e18bd817c3 (patch) | |
tree | 42d3986172a63915b6ac6a25827f99cc0941d0d5 | |
parent | 2004-11-23 Timo Schulz <[email protected]> (diff) | |
download | libassuan-7fe365f5e0995515ca95aee10768d9e18bd817c3.tar.gz libassuan-7fe365f5e0995515ca95aee10768d9e18bd817c3.zip |
Small API update and Windows fixes
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/assuan-handler.c | 12 | ||||
-rw-r--r-- | src/assuan-socket.c | 10 | ||||
-rw-r--r-- | src/assuan.h | 4 |
5 files changed, 24 insertions, 11 deletions
@@ -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 <[email protected]> + + * assuan-socket.c[!_WIN32]: Fixed includes. + 2004-11-23 Timo Schulz <[email protected]> * 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 <[email protected]> + + * assuan-handler.c (assuan_write_status): Return an error code. + 2004-11-22 Timo Schulz <[email protected]> * 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 |