struct cdbdata *cdbfr;
if (IMAP->selected == 0) {
- lprintf(CTDL_ERR,
+ CtdlLogPrintf(CTDL_ERR,
"imap_load_msgids() can't run; no room selected\n");
return;
}
int num_recent = 0;
if (IMAP->selected == 0) {
- lprintf(CTDL_ERR,
+ CtdlLogPrintf(CTDL_ERR,
"imap_load_msgids() can't run; no room selected\n");
return;
}
if (cdbfr != NULL) {
msglist = malloc(cdbfr->len);
if (msglist == NULL) {
- lprintf(CTDL_CRIT, "malloc() failed\n");
+ CtdlLogPrintf(CTDL_CRIT, "malloc() failed\n");
abort();
}
memcpy(msglist, cdbfr->ptr, (size_t)cdbfr->len);
imap_do_expunge();
}
- lprintf(CTDL_DEBUG, "Performing IMAP cleanup hook\n");
+ CtdlLogPrintf(CTDL_DEBUG, "Performing IMAP cleanup hook\n");
imap_free_msgids();
imap_free_transmitted_message();
}
free(IMAP);
- lprintf(CTDL_DEBUG, "Finished IMAP cleanup hook\n");
+ CtdlLogPrintf(CTDL_DEBUG, "Finished IMAP cleanup hook\n");
}
long *delmsgs = NULL;
int num_delmsgs = 0;
- lprintf(CTDL_DEBUG, "imap_do_expunge() called\n");
+ CtdlLogPrintf(CTDL_DEBUG, "imap_do_expunge() called\n");
if (IMAP->selected == 0) {
return (0);
}
imap_rescan_msgids();
}
- lprintf(CTDL_DEBUG, "Expunged %d messages from <%s>\n",
+ CtdlLogPrintf(CTDL_DEBUG, "Expunged %d messages from <%s>\n",
num_expunged, CC->room.QRname);
return (num_expunged);
}
if (strchr(parms[2], '\\') != NULL) {
cprintf("%s NO Invalid character in folder name\r\n",
parms[0]);
- lprintf(CTDL_DEBUG, "invalid character in folder name\n");
+ CtdlLogPrintf(CTDL_DEBUG, "invalid character in folder name\n");
return;
}
if (ret < 0) {
cprintf("%s NO Invalid mailbox name or location\r\n",
parms[0]);
- lprintf(CTDL_DEBUG, "invalid mailbox name or location\n");
+ CtdlLogPrintf(CTDL_DEBUG, "invalid mailbox name or location\n");
return;
}
floornum = (ret & 0x00ff); /* lower 8 bits = floor number */
if (flags & IR_MAILBOX) {
if (strncasecmp(parms[2], "INBOX/", 6)) {
cprintf("%s NO Personal folders must be created under INBOX\r\n", parms[0]);
- lprintf(CTDL_DEBUG, "not subordinate to inbox\n");
+ CtdlLogPrintf(CTDL_DEBUG, "not subordinate to inbox\n");
return;
}
}
newroomview = VIEW_BBS;
}
- lprintf(CTDL_INFO, "Create new room <%s> on floor <%d> with type <%d>\n",
+ CtdlLogPrintf(CTDL_INFO, "Create new room <%s> on floor <%d> with type <%d>\n",
roomname, floornum, newroomtype);
ret = create_room(roomname, newroomtype, "", floornum, 1, 0, newroomview);
} else {
cprintf("%s OK CREATE completed\r\n", parms[0]);
}
- lprintf(CTDL_DEBUG, "imap_create() completed\n");
+ CtdlLogPrintf(CTDL_DEBUG, "imap_create() completed\n");
}
irl->irl_newfloor);
if (r != crr_ok) {
/* FIXME handle error returns better */
- lprintf(CTDL_ERR, "CtdlRenameRoom() error %d\n", r);
+ CtdlLogPrintf(CTDL_ERR, "CtdlRenameRoom() error %d\n", r);
}
irlp = irl;
irl = irl->next;
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
flush_output();
if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
- lprintf(CTDL_ERR, "Client disconnected: ending session.\r\n");
+ CtdlLogPrintf(CTDL_ERR, "Client disconnected: ending session.\r\n");
CC->kill_me = 1;
return;
}
if (IMAP->authstate == imap_as_expecting_password) {
- lprintf(CTDL_INFO, "IMAP: <password>\n");
+ CtdlLogPrintf(CTDL_INFO, "IMAP: <password>\n");
}
else if (IMAP->authstate == imap_as_expecting_plainauth) {
- lprintf(CTDL_INFO, "IMAP: <plain_auth>\n");
+ CtdlLogPrintf(CTDL_INFO, "IMAP: <plain_auth>\n");
}
else if (bmstrcasestr(cmdbuf, " LOGIN ")) {
- lprintf(CTDL_INFO, "IMAP: LOGIN...\n");
+ CtdlLogPrintf(CTDL_INFO, "IMAP: LOGIN...\n");
}
else {
- lprintf(CTDL_INFO, "IMAP: %s\n", cmdbuf);
+ CtdlLogPrintf(CTDL_INFO, "IMAP: %s\n", cmdbuf);
}
while (strlen(cmdbuf) < 5)
gettimeofday(&tv2, NULL);
total_time = (tv2.tv_usec + (tv2.tv_sec * 1000000)) - (tv1.tv_usec + (tv1.tv_sec * 1000000));
- lprintf(CTDL_DEBUG, "IMAP command completed in %ld.%ld seconds\n",
+ CtdlLogPrintf(CTDL_DEBUG, "IMAP command completed in %ld.%ld seconds\n",
(total_time / 1000000),
(total_time % 1000000)
);