Commit 5b77e1ad 5b77e1ad4728547db2bb8a5edd62ecdc09fba80f by Sergey Poznyakoff

imap4d: log client identity

* imap4d/id.c (eat_args): Log the client identity using the info channel.
* imap4d/list.c: tiny change
1 parent 96dd35f0
......@@ -39,16 +39,23 @@ eat_args (imap4d_tokbuf_t tok)
else if (p[0] != '(')
return RESP_BAD;
mu_diag_init ();
mu_stream_printf (mu_strerr, "\033s<%d>%s", MU_DIAG_INFO,
_("client identification: "));
/* Collect arguments */
while ((p = imap4d_tokbuf_getarg (tok, n++)))
{
if (p[0] == ')')
{
mu_stream_printf (mu_strerr, "\n");
if (imap4d_tokbuf_getarg (tok, n))
return RESP_BAD;
return RESP_OK;
}
mu_stream_printf (mu_strerr, "%s%c", p, (n % 2) ? ' ' : '=');
}
mu_stream_printf (mu_strerr, "\n");
return RESP_BAD;
}
......
......@@ -210,7 +210,7 @@ imap4d_list (struct imap4d_session *session,
if (pfx->ns == NS_OTHER
&& strcmp (ref, pfx->prefix) == 0
&& *mu_str_skip_cset_comp (wcard, "*%"))
&& strpbrk (wcard, "*%"))
{
/* [A] server MAY return NO to such a LIST command, requiring that a
user name be included with the Other Users' Namespace prefix
......