From: Adam Dickmeiss Date: Thu, 23 Feb 1995 10:08:20 +0000 (+0000) Subject: Added logging of all user commands. X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=d70fc85cc8fad22df256ddf2951e3c78c4785359;p=egate.git Added logging of all user commands. --- diff --git a/kernel/urp.c b/kernel/urp.c index 5515208..c6dc851 100644 --- a/kernel/urp.c +++ b/kernel/urp.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: urp.c,v $ - * Revision 1.15 1995/02/23 08:32:17 adam + * Revision 1.16 1995/02/23 10:08:20 adam + * Added logging of all user commands. + * + * Revision 1.15 1995/02/23 08:32:17 adam * Changed header. * * Revision 1.13 1995/02/22 16:54:42 adam @@ -625,7 +628,7 @@ static int exec_command (const char *str) { if (!info.zass && no != 9 && no != 4) reopen_target (); - fprintf (reply_fd, "\n> %s", str); + fprintf (reply_fd, "\n> %s\n", str); if (!info.zass && (no == 1 || no == 2 || no == 3)) { fprintf (reply_fd, "%s\n", @@ -705,8 +708,13 @@ int urp (FILE *inf) "Email->Z39.50 gateway")); while (fgets (line_buf, LINE_MAX, inf)) { + char *cp; + if (line_buf[0] == '\n') break; + if ((cp = strchr (line_buf, '\n'))) + *cp = '\0'; + gw_log (GW_LOG_ACCT, "urp", "cmd: %s", line_buf); ccl_token_and = gw_res_get (info.kernel_res, "ccl.token.and", "and"); ccl_token_or = gw_res_get (info.kernel_res, "ccl.token.or", "or"); ccl_token_not = gw_res_get (info.kernel_res, "ccl.token.not", "not"); @@ -741,7 +749,7 @@ int urp (FILE *inf) gw_log (GW_LOG_FATAL, "urp", "Reply '%s' got exit code %d", cmd, mta_code); unlink (reply_fname); - gw_log (GW_LOG_DEBUG, "urp", "Normal session end of %s", from_str); + gw_log (GW_LOG_DEBUG, "urp", "Normal session for user %s", from_str); } return 0; }