diff --git a/gck-rpc-dispatch.c b/gck-rpc-dispatch.c index a219a320f1e43b95d9555357111a241871f110e0..e1f3bd1b64ff5ed51235eec931333d96a138228e 100644 --- a/gck-rpc-dispatch.c +++ b/gck-rpc-dispatch.c @@ -81,7 +81,8 @@ static pthread_mutex_t pkcs11_dispatchers_mutex = PTHREAD_MUTEX_INITIALIZER; /* ----------------------------------------------------------------------------- * LOGGING and DEBUGGING */ - +#undef DEBUG_OUTPUT +#define DEBUG_OUTPUT 1 #if DEBUG_OUTPUT #define debug(x) gck_rpc_debug x #else @@ -99,6 +100,7 @@ void gck_rpc_log(const char *msg, ...) va_start(ap, msg); vfprintf(stdout, msg, ap); + printf("\n"); va_end(ap); } @@ -2096,6 +2098,7 @@ static void run_dispatch_loop(CallState *cs) /* The client application */ if (!read_all(cs->sock, (unsigned char *)&cs->appid, sizeof (cs->appid))) { + gck_rpc_warn("Can't read appid\n"); return ; } gck_rpc_log("New session %d-%d\n", (uint32_t) (cs->appid >> 32), diff --git a/gck-rpc-module.c b/gck-rpc-module.c index d2f76753cd7f2f79d5f6f138322be4102612d8b1..1afe9503e535589104031d1fe7d7d60ca70d2502 100644 --- a/gck-rpc-module.c +++ b/gck-rpc-module.c @@ -73,7 +73,6 @@ static char pkcs11_socket_path[MAXPATHLEN] = { 0, }; /* ----------------------------------------------------------------------------- * LOGGING and DEBUGGING */ -#undef DEBUG_OUTPUT #define DEBUG_OUTPUT 0 #if DEBUG_OUTPUT #define debug(x) gck_rpc_debug x @@ -91,6 +90,7 @@ void gck_rpc_log(const char *msg, ...) va_start(ap, msg); vfprintf(stderr, msg, ap); + fprintf(stderr, "\n"); va_end(ap); }