2007-09-27 Marcus Brinkmann <marcus@g10code.de>
* assuan-pipe-connect.c (pipe_connect_gpgme): Fix last change. gpgme/ 2007-09-27 Marcus Brinkmann <marcus@g10code.de> * w32-glib-io.c (_gpgme_io_pipe), w32-qt-io.c (_gpgme_io_pipe), w32-io.c (_gpgme_io_pipe), posix-io.c (_gpgme_io_pipe): Fix debug output.
This commit is contained in:
parent
90a7b74477
commit
8495b4f031
@ -571,7 +571,7 @@ pipe_connect_gpgme (assuan_context_t *ctx,
|
|||||||
{
|
{
|
||||||
assuan_error_t err;
|
assuan_error_t err;
|
||||||
int pid;
|
int pid;
|
||||||
int rp[2];
|
int rp[2];
|
||||||
int wp[2];
|
int wp[2];
|
||||||
char mypidstr[50];
|
char mypidstr[50];
|
||||||
struct spawn_fd_item_s child_fds[3]; /* stdin, stdout, terminating -1 */
|
struct spawn_fd_item_s child_fds[3]; /* stdin, stdout, terminating -1 */
|
||||||
@ -586,10 +586,10 @@ int rp[2];
|
|||||||
sprintf (mypidstr, "%lu", (unsigned long)getpid ());
|
sprintf (mypidstr, "%lu", (unsigned long)getpid ());
|
||||||
|
|
||||||
/* Create the two pipes. */
|
/* Create the two pipes. */
|
||||||
if (_gpgme_io_pipe (rp, 0))
|
if (_gpgme_io_pipe (rp, 1))
|
||||||
return _assuan_error (ASSUAN_General_Error);
|
return _assuan_error (ASSUAN_General_Error);
|
||||||
|
|
||||||
if (_gpgme_io_pipe (wp, 1))
|
if (_gpgme_io_pipe (wp, 0))
|
||||||
{
|
{
|
||||||
_gpgme_io_close (rp[0]);
|
_gpgme_io_close (rp[0]);
|
||||||
_gpgme_io_close (rp[1]);
|
_gpgme_io_close (rp[1]);
|
||||||
@ -706,7 +706,7 @@ build_w32_commandline (const char * const *argv, char **cmdline)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_W32_SYSTEM
|
#ifdef HAVE_W32_SYSTEM
|
||||||
/* Create pipe where one end end is inheritable. */
|
/* Create pipe where one end is inheritable. */
|
||||||
static int
|
static int
|
||||||
create_inheritable_pipe (int filedes[2], int for_write)
|
create_inheritable_pipe (int filedes[2], int for_write)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2007-09-27 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* w32-glib-io.c (_gpgme_io_pipe), w32-qt-io.c (_gpgme_io_pipe),
|
||||||
|
w32-io.c (_gpgme_io_pipe), posix-io.c (_gpgme_io_pipe): Fix debug
|
||||||
|
output.
|
||||||
|
|
||||||
2007-09-25 Marcus Brinkmann <marcus@g10code.de>
|
2007-09-25 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* conversion.c, keylist.c: Include <sys/types.h>.
|
* conversion.c, keylist.c: Include <sys/types.h>.
|
||||||
|
@ -118,7 +118,7 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
|
|||||||
int err;
|
int err;
|
||||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
||||||
"inherit_idx=%i (GPGME uses it for %s)",
|
"inherit_idx=%i (GPGME uses it for %s)",
|
||||||
inherit_idx, inherit_idx ? "writing" : "reading");
|
inherit_idx, inherit_idx ? "reading" : "writing");
|
||||||
|
|
||||||
err = pipe (filedes);
|
err = pipe (filedes);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -221,7 +221,7 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
|
|||||||
GIOChannel *chan;
|
GIOChannel *chan;
|
||||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
||||||
"inherit_idx=%i (GPGME uses it for %s)",
|
"inherit_idx=%i (GPGME uses it for %s)",
|
||||||
inherit_idx, inherit_idx ? "writing" : "reading");
|
inherit_idx, inherit_idx ? "reading" : "writing");
|
||||||
|
|
||||||
#define PIPEBUF_SIZE 4096
|
#define PIPEBUF_SIZE 4096
|
||||||
if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT | O_BINARY) == -1)
|
if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT | O_BINARY) == -1)
|
||||||
|
@ -805,7 +805,7 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
|
|||||||
SECURITY_ATTRIBUTES sec_attr;
|
SECURITY_ATTRIBUTES sec_attr;
|
||||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
||||||
"inherit_idx=%i (GPGME uses it for %s)",
|
"inherit_idx=%i (GPGME uses it for %s)",
|
||||||
inherit_idx, inherit_idx ? "writing" : "reading");
|
inherit_idx, inherit_idx ? "reading" : "writing");
|
||||||
|
|
||||||
memset (&sec_attr, 0, sizeof (sec_attr));
|
memset (&sec_attr, 0, sizeof (sec_attr));
|
||||||
sec_attr.nLength = sizeof (sec_attr);
|
sec_attr.nLength = sizeof (sec_attr);
|
||||||
|
@ -194,7 +194,7 @@ _gpgme_io_pipe (int filedes[2], int inherit_idx)
|
|||||||
QIODevice *chan;
|
QIODevice *chan;
|
||||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_pipe", filedes,
|
||||||
"inherit_idx=%i (GPGME uses it for %s)",
|
"inherit_idx=%i (GPGME uses it for %s)",
|
||||||
inherit_idx, inherit_idx ? "writing" : "reading");
|
inherit_idx, inherit_idx ? "reading" : "writing");
|
||||||
|
|
||||||
#define PIPEBUF_SIZE 4096
|
#define PIPEBUF_SIZE 4096
|
||||||
if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT | O_BINARY) == -1)
|
if (_pipe (filedes, PIPEBUF_SIZE, O_NOINHERIT | O_BINARY) == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user