aboutsummaryrefslogtreecommitdiffstats
path: root/src/context.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2009-11-27 19:12:01 +0000
committerMarcus Brinkmann <[email protected]>2009-11-27 19:12:01 +0000
commit4b6374bc374428ac71c43e1158ff75a027a1eb72 (patch)
tree124bd553fc3481405fd1e573b978fb2a1f362d19 /src/context.c
parentdoc/ (diff)
downloadlibassuan-4b6374bc374428ac71c43e1158ff75a027a1eb72.tar.gz
libassuan-4b6374bc374428ac71c43e1158ff75a027a1eb72.zip
2009-11-27 Marcus Brinkmann <[email protected]>
* assuan.h (assuan_set_assuan_log_stream): Add prototype. * libassuan.def, libassuan.vers: Add back assuan_set_assuan_log_stream. * assuan-logging.c (assuan_set_assuan_log_stream): Add back. * context.c (assuan_get_pointer): Don't output debug info here. (assuan_get_peercred, assuan_get_pid): But do here. * system.c: Improve debug output. * assuan-defs.h (struct assuan_context_s): Rename pipe_mode to max_accepts. * assuan-listen.c (assuan_accept): Rework max accepts logic. * assuan-socket-server.c (assuan_init_socket_server), assuan-socket-connect.c (assuan_socket_connect), assuan-pipe-server.c (assuan_init_pipe_server), assuan-pipe-connect.c (socketpair_connect): Add debug output, set max_accepts instead of pipe_mode.
Diffstat (limited to 'src/context.c')
-rw-r--r--src/context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/context.c b/src/context.c
index 42ec439..2be3a31 100644
--- a/src/context.c
+++ b/src/context.c
@@ -42,8 +42,11 @@ assuan_set_pointer (assuan_context_t ctx, void *user_pointer)
void *
assuan_get_pointer (assuan_context_t ctx)
{
+#if 0
+ /* This is called often. */
TRACE1 (ctx, ASSUAN_LOG_CTX, "assuan_get_pointer", ctx,
"ctx->user_pointer=%p", ctx ? ctx->user_pointer : NULL);
+#endif
if (! ctx)
return NULL;
@@ -177,6 +180,9 @@ assuan_set_error (assuan_context_t ctx, gpg_error_t err, const char *text)
pid_t
assuan_get_pid (assuan_context_t ctx)
{
+ TRACE1 (ctx, ASSUAN_LOG_CTX, "assuan_get_pid", ctx,
+ "pid=%i", ctx ? ctx->pid : -1);
+
return (ctx && ctx->pid) ? ctx->pid : ASSUAN_INVALID_PID;
}
@@ -186,6 +192,8 @@ assuan_get_pid (assuan_context_t ctx)
gpg_error_t
assuan_get_peercred (assuan_context_t ctx, assuan_peercred_t *peercred)
{
+ TRACE (ctx, ASSUAN_LOG_CTX, "assuan_get_peercred", ctx);
+
if (!ctx)
return _assuan_error (ctx, GPG_ERR_ASS_INV_VALUE);
if (!ctx->peercred_valid)