[svn] assuan - r269 - trunk/src
svn author wk
cvs at cvs.gnupg.org
Thu Oct 4 14:24:38 CEST 2007
Author: wk
Date: 2007-10-04 14:24:29 +0200 (Thu, 04 Oct 2007)
New Revision: 269
Modified:
trunk/src/ChangeLog
trunk/src/assuan-buffer.c
trunk/src/assuan-socket-connect.c
trunk/src/mkerrors
Log:
Better error mapping.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-10-02 08:44:21 UTC (rev 268)
+++ trunk/src/ChangeLog 2007-10-04 12:24:29 UTC (rev 269)
@@ -1,3 +1,8 @@
+2007-10-04 Werner Koch <wk at g10code.com>
+
+ * mkerrors: Map EAGAIN to GPG_ERR_EAGAIN for read and write
+ errors.
+
2007-10-02 Werner Koch <wk at g10code.com>
* assuan-io.c (_assuan_io_read) [W32]: Map WSAEWOULDBLOCK to EAGAIN.
Modified: trunk/src/assuan-buffer.c
===================================================================
--- trunk/src/assuan-buffer.c 2007-10-02 08:44:21 UTC (rev 268)
+++ trunk/src/assuan-buffer.c 2007-10-04 12:24:29 UTC (rev 269)
@@ -133,10 +133,11 @@
if (rc)
{
if (ctx->log_fp)
- fprintf (ctx->log_fp, "%s[%u.%d] DBG: <- [Error: %s]\n",
- assuan_get_assuan_log_prefix (),
+ fprintf (ctx->log_fp, "%s[%u.%d] DBG: <- [Error: %s]\n",
+ assuan_get_assuan_log_prefix (),
(unsigned int)getpid (), (int)ctx->inbound.fd,
strerror (errno));
+
return _assuan_error (ASSUAN_Read_Error);
}
if (!nread)
Modified: trunk/src/assuan-socket-connect.c
===================================================================
--- trunk/src/assuan-socket-connect.c 2007-10-02 08:44:21 UTC (rev 268)
+++ trunk/src/assuan-socket-connect.c 2007-10-04 12:24:29 UTC (rev 269)
@@ -85,7 +85,7 @@
/* Make a connection to the Unix domain socket NAME and return a new
Assuan context in CTX. SERVER_PID is currently not used but may
become handy in the future. With flags set to 1 sendmsg and
- recvmesg are used. */
+ recvmsg are used. */
assuan_error_t
assuan_socket_connect_ext (assuan_context_t *r_ctx,
const char *name, pid_t server_pid,
Modified: trunk/src/mkerrors
===================================================================
--- trunk/src/mkerrors 2007-10-02 08:44:21 UTC (rev 268)
+++ trunk/src/mkerrors 2007-10-04 12:24:29 UTC (rev 269)
@@ -93,6 +93,9 @@
switch (errno)
{
case 0: n = 16381; /*GPG_ERR_MISSING_ERRNO*/ break;
+ case EAGAIN:
+ n = (6 | (1 << 15));
+ break;
default: n = 270; /*GPG_ERR_ASS_READ_ERROR*/ break;
}
break;
@@ -101,6 +104,9 @@
switch (errno)
{
case 0: n = 16381; /*GPG_ERR_MISSING_ERRNO*/ break;
+ case EAGAIN:
+ n = (6 | (1 << 15));
+ break;
default: n = 271; /*GPG_ERR_ASS_WRITE_ERROR*/ break;
}
break;
@@ -114,7 +120,9 @@
an error is indeed returned. */
n = 16381; /*GPG_ERR_MISSING_ERRNO*/
break;
- case ENOMEM: n = (1 << 15) | 86; break;
+ case ENOMEM:
+ n = (86 | (1 << 15));
+ break;
default:
n = 16382; /*GPG_ERR_UNKNOWN_ERRNO*/
break;
More information about the Gnupg-commits
mailing list