/*
* Implements the LIST and LSUB commands.
*
- * Copyright (c) 2000-2009 by Art Cancro and others.
+ * Copyright (c) 2000-2017 by Art Cancro and others.
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
+#include <time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
}
if (match) {
IAPrintf("* %s (\\NoSelect \\HasChildren) \"/\" ", verb);
- plain_imap_strout(fl->f_name);
+ IPutStr(fl->f_name, (fl->f_name)?strlen(fl->f_name):0);
IAPuts("\r\n");
}
}
}
if (yes_output_this_room) {
- imap_mailboxname(MailboxName, sizeof MailboxName, qrbuf);
+ long len;
+ len = imap_mailboxname(MailboxName, sizeof MailboxName, qrbuf);
match = 0;
for (i=0; i<ImapFilter->num_patterns; ++i) {
if (imap_mailbox_matches_pattern(ChrPtr(ImapFilter->patterns[i]), MailboxName)) {
}
if (match) {
IAPrintf("* %s (%s) \"/\" ", ImapFilter->verb, return_options);
- plain_imap_strout(MailboxName);
+ IPutStr(MailboxName, len);
IAPuts("\r\n");
}
}
&Params[i],
1);
- IMAP_syslog(LOG_DEBUG, "evaluating <%s>", Params[i].Key);
+ syslog(LOG_DEBUG, "evaluating <%s>", Params[i].Key);
if (!strcasecmp(Params[i].Key, "SUBSCRIBED")) {
ImapFilter.return_subscribed = 1;
*/
for (i=0; i<ImapFilter.num_patterns; ++i) {
FreeStrBuf(&ImapFilter.patterns[i]);
- free(ImapFilter.patterns);
-
}
+ free(ImapFilter.patterns);
IReplyPrintf("OK %s completed", ImapFilter.verb);
}