diff options
author | Werner Koch <wk@gnupg.org> | 2001-11-24 21:20:22 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2001-11-24 21:20:22 +0000 |
commit | e4eb73109e33a3932380825e022d305272dfbc18 (patch) | |
tree | 7b319e63fc18a64f95b7519f2806255587d855aa | |
parent | 3330fe3b478d4f0e9ec7806de01b54e22d853f6c (diff) | |
download | libassuan-e4eb73109e33a3932380825e022d305272dfbc18.tar.gz |
* assuan-connect.c (assuan_get_pid): New - actually done by Marcus in gpgme.
Set the line length back to the old value.
-rw-r--r-- | src/ChangeLog | 2 | ||||
-rw-r--r-- | src/assuan-connect.c | 6 | ||||
-rw-r--r-- | src/assuan-defs.h | 2 | ||||
-rw-r--r-- | src/assuan.h | 4 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6560526..734ce5e 100644 --- a/src/ChangeLog +++ b/src/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/src/assuan-connect.c b/src/assuan-connect.c index 778b3a7..37d4262 100644 --- a/src/assuan-connect.c +++ b/src/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/src/assuan-defs.h b/src/assuan-defs.h index 3772e29..05e548c 100644 --- a/src/assuan-defs.h +++ b/src/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/src/assuan.h b/src/assuan.h index 7500da1..a5ae8ae 100644 --- a/src/assuan.h +++ b/src/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), |