summaryrefslogtreecommitdiffstats
path: root/assuan
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2001-11-24 22:20:22 +0100
committerWerner Koch <wk@gnupg.org>2001-11-24 22:20:22 +0100
commit2be29a3cd2fc7e43856b729bbb586437c93c9547 (patch)
treee8e348a6f5890ad0fb1fcd4f6a37d8643a68d12b /assuan
parent* assuan-buffer.c (_assuan_read_line): Deal with reads of more (diff)
downloadgnupg2-2be29a3cd2fc7e43856b729bbb586437c93c9547.tar.xz
gnupg2-2be29a3cd2fc7e43856b729bbb586437c93c9547.zip
* assuan-connect.c (assuan_get_pid): New - actually done by Marcus in gpgme.
Set the line length back to the old value.
Diffstat (limited to 'assuan')
-rw-r--r--assuan/ChangeLog2
-rw-r--r--assuan/assuan-connect.c6
-rw-r--r--assuan/assuan-defs.h2
-rw-r--r--assuan/assuan.h4
4 files changed, 13 insertions, 1 deletions
diff --git a/assuan/ChangeLog b/assuan/ChangeLog
index 656052637..734ce5e2a 100644
--- a/assuan/ChangeLog
+++ b/assuan/ChangeLog
@@ -1,5 +1,7 @@
2001-11-24 Werner Koch <wk@gnupg.org>
+ * assuan-connect.c (assuan_get_pid): New.
+
* assuan-buffer.c (_assuan_read_line): Deal with reads of more
than a line.
* assuan-defs.h: Add space in the context for this.
diff --git a/assuan/assuan-connect.c b/assuan/assuan-connect.c
index 778b3a770..37d426255 100644
--- a/assuan/assuan-connect.c
+++ b/assuan/assuan-connect.c
@@ -127,3 +127,9 @@ assuan_pipe_disconnect (ASSUAN_CONTEXT ctx)
waitpid (ctx->pid, NULL, 0); /* FIXME Check return value. */
assuan_deinit_pipe_server (ctx);
}
+
+pid_t
+assuan_get_pid (ASSUAN_CONTEXT ctx)
+{
+ return ctx ? ctx->pid : -1;
+}
diff --git a/assuan/assuan-defs.h b/assuan/assuan-defs.h
index 3772e2966..05e548cb6 100644
--- a/assuan/assuan-defs.h
+++ b/assuan/assuan-defs.h
@@ -24,7 +24,7 @@
#include <sys/types.h>
#include "assuan.h"
-#define LINELENGTH 102 /* 1000 + [CR,]LF */
+#define LINELENGTH 1002 /* 1000 + [CR,]LF */
struct cmdtbl_s {
const char *name;
diff --git a/assuan/assuan.h b/assuan/assuan.h
index 7500da1f3..a5ae8ae06 100644
--- a/assuan/assuan.h
+++ b/assuan/assuan.h
@@ -21,6 +21,9 @@
#ifndef ASSUAN_H
#define ASSUAN_H
+#include <stdio.h>
+#include <sys/types.h>
+
#ifdef __cplusplus
extern "C" {
#if 0
@@ -101,6 +104,7 @@ void assuan_deinit_pipe_server (ASSUAN_CONTEXT ctx);
AssuanError assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name,
char *const argv[]);
void assuan_pipe_disconnect (ASSUAN_CONTEXT ctx);
+pid_t assuan_get_pid (ASSUAN_CONTEXT ctx);
/*-- assuan-util.c --*/
void assuan_set_malloc_hooks ( void *(*new_alloc_func)(size_t n),