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) ...@@ -39,16 +39,23 @@ eat_args (imap4d_tokbuf_t tok)
39 else if (p[0] != '(') 39 else if (p[0] != '(')
40 return RESP_BAD; 40 return RESP_BAD;
41 41
42 mu_diag_init ();
43 mu_stream_printf (mu_strerr, "\033s<%d>%s", MU_DIAG_INFO,
44 _("client identification: "));
45
42 /* Collect arguments */ 46 /* Collect arguments */
43 while ((p = imap4d_tokbuf_getarg (tok, n++))) 47 while ((p = imap4d_tokbuf_getarg (tok, n++)))
44 { 48 {
45 if (p[0] == ')') 49 if (p[0] == ')')
46 { 50 {
51 mu_stream_printf (mu_strerr, "\n");
47 if (imap4d_tokbuf_getarg (tok, n)) 52 if (imap4d_tokbuf_getarg (tok, n))
48 return RESP_BAD; 53 return RESP_BAD;
49 return RESP_OK; 54 return RESP_OK;
50 } 55 }
56 mu_stream_printf (mu_strerr, "%s%c", p, (n % 2) ? ' ' : '=');
51 } 57 }
58 mu_stream_printf (mu_strerr, "\n");
52 return RESP_BAD; 59 return RESP_BAD;
53 } 60 }
54 61
......
...@@ -210,7 +210,7 @@ imap4d_list (struct imap4d_session *session, ...@@ -210,7 +210,7 @@ imap4d_list (struct imap4d_session *session,
210 210
211 if (pfx->ns == NS_OTHER 211 if (pfx->ns == NS_OTHER
212 && strcmp (ref, pfx->prefix) == 0 212 && strcmp (ref, pfx->prefix) == 0
213 && *mu_str_skip_cset_comp (wcard, "*%")) 213 && strpbrk (wcard, "*%"))
214 { 214 {
215 /* [A] server MAY return NO to such a LIST command, requiring that a 215 /* [A] server MAY return NO to such a LIST command, requiring that a
216 user name be included with the Other Users' Namespace prefix 216 user name be included with the Other Users' Namespace prefix
......