145 |
unseen = strtoul(c, NULL, 10); |
unseen = strtoul(c, NULL, 10); |
146 |
} |
} |
147 |
if (!exist) { |
if (!exist) { |
148 |
info("No messages in mailbox %s.\n", mbox); |
info("No messages in mailbox \"%s\".\n", mbox); |
149 |
return -2; |
return -2; |
150 |
} |
} |
151 |
info("%d message%s, %d recent, %d unseen, in mailbox %s.\n", exist, |
info("%d message%s, %d recent, %d unseen, in mailbox \"%s\".\n", exist, |
152 |
plural(exist), recent, unseen, mbox); |
plural(exist), recent, unseen, mbox); |
153 |
|
|
154 |
return r; |
return r; |
312 |
*/ |
*/ |
313 |
int copy_response(unsigned int tag) |
int copy_response(unsigned int tag) |
314 |
{ |
{ |
315 |
|
int r = RESPONSE_OK; |
316 |
|
|
317 |
char buf[RESPONSE_BUF]; |
char buf[RESPONSE_BUF]; |
318 |
|
|
319 |
do |
do |
320 |
receive_response(buf); |
receive_response(buf); |
321 |
while (!strcasestr(buf, ultostr(tag, 16))); |
while (!strcasestr(buf, ultostr(tag, 16))); |
322 |
|
|
323 |
if (analyze_response(buf) == RESPONSE_NO && |
if ((r = analyze_response(buf)) == RESPONSE_NO && |
324 |
strcasestr(buf, "[TRYCREATE]")) |
strcasestr(buf, "[TRYCREATE]")) |
325 |
return RESPONSE_TRYCREATE; |
return RESPONSE_TRYCREATE; |
326 |
|
|
327 |
return RESPONSE_OK; |
return r; |
328 |
} |
} |
329 |
|
|
330 |
|
|