/* Bump this user's messages posted counter. */
MSGM_syslog(LOG_DEBUG, "Updating user\n");
- CtdlGetUserLock(&CCC->user, CCC->curr_user);
+ CtdlLockGetCurrentUser();
CCC->user.posted = CCC->user.posted + 1;
- CtdlPutUserLock(&CCC->user);
+ CtdlPutCurrentUserLock();
/* Decide where bounces need to be delivered */
if ((recps != NULL) && (recps->bounce_to == NULL))
const char *subject,
int nCriterions,
const char **CritStr,
- long *CritStrLen,
+ const long *CritStrLen,
long ccid,
long ioid,
time_t NOW)
eUpdate,
ccid,
ioid);
- if (seenstamp < tsday)
+ if ((seenstamp > 0) && (seenstamp < tsday))
{
FreeStrBuf(&guid);
/* yes, we did. flood protection kicks in. */
IO->SendBuf.fd);
fd = fopen(fn, "a+");
+ if (fd == NULL) {
+ syslog(LOG_EMERG, "failed to open file %s: %s", fn, strerror(errno));
+ cit_backtrace();
+ exit(1);
+ }
#endif
ReadMsg = IO->ReadMsg;
if (MsgFinished)
return eReadSuccess;
else
- return eAbort;
+ return eReadFail;
}