[svn] GnuPG - r5356 - in trunk: common sm

svn author marcus cvs at cvs.gnupg.org
Fri Jun 11 01:17:33 CEST 2010


Author: marcus
Date: 2010-06-11 01:17:33 +0200 (Fri, 11 Jun 2010)
New Revision: 5356

Modified:
   trunk/common/ChangeLog
   trunk/common/sysutils.c
   trunk/sm/ChangeLog
   trunk/sm/server.c
Log:
common/
2010-06-11  Marcus Brinkmann  <marcus at g10code.de>

	* sysutils.c (translate_sys2libc_fd): Revert last change.
	(translate_sys2libc_fd_int): Revert last change.

sm/
2010-06-11  Marcus Brinkmann  <marcus at g10code.de>

	* server.c (cmd_message) [HAVE_W32CE_SYSTEM]: Finish pipe.


Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2010-06-10 17:55:22 UTC (rev 5355)
+++ trunk/common/ChangeLog	2010-06-10 23:17:33 UTC (rev 5356)
@@ -1,3 +1,8 @@
+2010-06-11  Marcus Brinkmann  <marcus at g10code.de>
+
+	* sysutils.c (translate_sys2libc_fd): Revert last change.
+	(translate_sys2libc_fd_int): Revert last change.
+
 2010-06-10  Marcus Brinkmann  <marcus at g10code.de>
 
 	* sysutils.c (translate_sys2libc_fd) [HAVE_W32CE_SYSTEM]:

Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog	2010-06-10 17:55:22 UTC (rev 5355)
+++ trunk/sm/ChangeLog	2010-06-10 23:17:33 UTC (rev 5356)
@@ -1,3 +1,7 @@
+2010-06-11  Marcus Brinkmann  <marcus at g10code.de>
+
+	* server.c (cmd_message) [HAVE_W32CE_SYSTEM]: Finish pipe.
+
 2010-06-10  Marcus Brinkmann  <marcus at g10code.de>
 
 	* server.c (SERVER_STDIN, SERVER_STDOUT): New macros.

Modified: trunk/common/sysutils.c
===================================================================
--- trunk/common/sysutils.c	2010-06-10 17:55:22 UTC (rev 5355)
+++ trunk/common/sysutils.c	2010-06-10 23:17:33 UTC (rev 5356)
@@ -280,7 +280,8 @@
 translate_sys2libc_fd (gnupg_fd_t fd, int for_write)
 {
 #if defined(HAVE_W32CE_SYSTEM)
-  return (int) _assuan_w32ce_finish_pipe ((int)fd, for_write);
+  (void)for_write;
+  return (int) fd;
 #elif defined(HAVE_W32_SYSTEM)
   int x;
 
@@ -307,7 +308,8 @@
 translate_sys2libc_fd_int (int fd, int for_write)
 {
 #if HAVE_W32CE_SYSTEM
-  return (int) _assuan_w32ce_finish_pipe (fd, for_write);
+  fd = (int) _assuan_w32ce_finish_pipe (fd, for_write);
+  return translate_sys2libc_fd ((void*)fd, for_write);
 #elif HAVE_W32_SYSTEM
   if (fd <= 2)
     return fd;	/* Do not do this for error, stdin, stdout, stderr. */

Modified: trunk/sm/server.c
===================================================================
--- trunk/sm/server.c	2010-06-10 17:55:22 UTC (rev 5355)
+++ trunk/sm/server.c	2010-06-10 23:17:33 UTC (rev 5356)
@@ -163,6 +163,7 @@
 {
   if (ctrl->server_local->message_fd != -1)
     {
+#warning Is this correct for W32/W32CE?
       close (ctrl->server_local->message_fd);
       ctrl->server_local->message_fd = -1;
     }
@@ -839,6 +840,14 @@
   rc = assuan_command_parse_fd (ctx, line, &sysfd);
   if (rc)
     return rc;
+
+#ifdef HAVE_W32CE_SYSTEM
+  sysfd = _assuan_w32ce_finish_pipe ((int)sysfd, 0);
+  if (sysfd == INVALID_HANDLE_VALUE)
+    return set_error (gpg_err_code_from_syserror (),
+		      "rvid conversion failed");
+#endif
+
   fd = translate_sys2libc_fd (sysfd, 0);
   if (fd == -1)
     return set_error (GPG_ERR_ASS_NO_INPUT, NULL);





More information about the Gnupg-commits mailing list