/* Don't do this stuff if this is not a POP3 session! */
if (CCC->h_command_function != pop3_command_loop) return;
+ struct citpop3 *pop3 = ((struct citpop3 *)CCC->session_specific_data);
POP3M_syslog(LOG_DEBUG, "Performing POP3 cleanup hook");
- if (POP3->msgs != NULL) free(POP3->msgs);
+ if (pop3->msgs != NULL) {
+ free(pop3->msgs);
+ }
- free(POP3);
+ free(pop3);
}
HEADERS_ALL,
0, 1, NULL,
SUPPRESS_ENV_TO,
- NULL, NULL);
+ NULL, NULL, NULL);
smi.meta_rfc822_length = StrLength(CCC->redirect_buffer);
FreeStrBuf(&CCC->redirect_buffer); /* TODO: WHEW, all this for just knowing the length???? */
CtdlOutputMsg(POP3->msgs[which_one - 1].msgnum,
MT_RFC822, HEADERS_ALL, 0, 1, NULL,
(ESC_DOT|SUPPRESS_ENV_TO),
- NULL, NULL);
+ NULL, NULL, NULL);
cprintf(".\r\n");
}
HEADERS_ALL,
0, 1, NULL,
SUPPRESS_ENV_TO,
- NULL, NULL);
+ NULL, NULL, NULL);
msgtext = CCC->redirect_buffer;
CCC->redirect_buffer = NULL;
/* Set last read pointer */
if (POP3->num_msgs > 0) {
- CtdlGetUserLock(&CCC->user, CCC->curr_user);
+ CtdlLockGetCurrentUser();
CtdlGetRelationship(&vbuf, &CCC->user, &CCC->room);
snprintf(vbuf.v_seen, sizeof vbuf.v_seen, "*:%ld",
POP3->msgs[POP3->num_msgs-1].msgnum);
CtdlSetRelationship(&vbuf, &CCC->user, &CCC->room);
- CtdlPutUserLock(&CCC->user);
+ CtdlPutCurrentUserLock();
}
}