diff options
author | Werner Koch <[email protected]> | 2002-01-19 18:20:15 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2002-01-19 18:20:15 +0000 |
commit | f58da1883a7d62d75a0b24f05c911c96febc0a85 (patch) | |
tree | d7a80bddeb9e3e30594485ae577677db0f06a893 /assuan/assuan-defs.h | |
parent | * gpg-agent.c: Removed unused cruft and implement the socket (diff) | |
download | gnupg-f58da1883a7d62d75a0b24f05c911c96febc0a85.tar.gz gnupg-f58da1883a7d62d75a0b24f05c911c96febc0a85.zip |
* assuan-buffer.c (_assuan_read_line): Add output logging.
(assuan_write_line): Ditto.
(_assuan_cookie_write_data): Ditto.
(_assuan_cookie_write_flush): Ditto.
* assuan-util.c (_assuan_log_print_buffer): New.
(assuan_set_log_stream): New.
(assuan_begin_confidential): New.
(assuan_end_confidential): New.
* assuan-defs.h: Add a few handler variables.
* assuan-pipe-server.c (assuan_deinit_pipe_server): Removed.
(deinit_pipe_server): New.
(assuan_deinit_server): New. Changed all callers to use this.
* assuan-listen.c (assuan_accept): Use the accept handler.
* assuan-handler.c (process_request): Use the close Handler.
* assuan-socket-server.c: New.
Diffstat (limited to '')
-rw-r--r-- | assuan/assuan-defs.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/assuan/assuan-defs.h b/assuan/assuan-defs.h index 07f56e32e..d19e6b9cc 100644 --- a/assuan/assuan-defs.h +++ b/assuan/assuan-defs.h @@ -35,7 +35,9 @@ struct cmdtbl_s { struct assuan_context_s { AssuanError err_no; const char *err_str; + int os_errno; /* last system error number used with certain error codes*/ + int confidential; int is_server; /* set if this is context belongs to a server */ int in_inquire; char *hello_line; @@ -43,6 +45,8 @@ struct assuan_context_s { void *user_pointer; /* for assuan_[gs]et_pointer () */ + FILE *log_fp; + struct { int fd; int eof; @@ -69,7 +73,12 @@ struct assuan_context_s { int pipe_mode; /* We are in pipe mode, i.e. we can handle just one connection and must terminate then */ - pid_t pid; /* In pipe mode, the pid of the child server process. */ + pid_t pid; /* In pipe mode, the pid of the child server process. */ + int listen_fd; /* The fd we are listening on (used by socket servers) */ + + void (*deinit_handler)(ASSUAN_CONTEXT); + int (*accept_handler)(ASSUAN_CONTEXT); + int (*finish_handler)(ASSUAN_CONTEXT); struct cmdtbl_s *cmdtbl; size_t cmdtbl_used; /* used entries */ @@ -85,8 +94,6 @@ struct assuan_context_s { int input_fd; /* set by INPUT command */ int output_fd; /* set by OUTPUT command */ - - }; @@ -115,6 +122,8 @@ void _assuan_free (void *p); #define set_error(c,e,t) assuan_set_error ((c), ASSUAN_ ## e, (t)) +void _assuan_log_print_buffer (FILE *fp, const void *buffer, size_t length); + #endif /*ASSUAN_DEFS_H*/ |