aboutsummaryrefslogtreecommitdiffstats
path: root/assuan/assuan-connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'assuan/assuan-connect.c')
-rw-r--r--assuan/assuan-connect.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/assuan/assuan-connect.c b/assuan/assuan-connect.c
index d260e927..ff1f6ffd 100644
--- a/assuan/assuan-connect.c
+++ b/assuan/assuan-connect.c
@@ -29,21 +29,19 @@
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
+#ifndef HAVE_W32_SYSTEM
#include <sys/wait.h>
+#endif
#include "assuan-defs.h"
/* Disconnect and release the context CTX. */
void
-assuan_disconnect (ASSUAN_CONTEXT ctx)
+assuan_disconnect (assuan_context_t ctx)
{
if (ctx)
{
-#if 0
- /* This may not work if the pipe is full and the other end is
- blocked. */
assuan_write_line (ctx, "BYE");
-#endif
ctx->finish_handler (ctx);
ctx->deinit_handler (ctx);
ctx->deinit_handler = NULL;
@@ -51,8 +49,10 @@ assuan_disconnect (ASSUAN_CONTEXT ctx)
}
}
+/* Return the PID of the peer or -1 if not known. */
pid_t
-assuan_get_pid (ASSUAN_CONTEXT ctx)
+assuan_get_pid (assuan_context_t ctx)
{
- return ctx ? ctx->pid : -1;
+ return (ctx && ctx->pid)? ctx->pid : -1;
}
+