char buf[SIZ];
char *ch;
char bounce_to[256];
+ int i = 0;
ld->msgnum = msgnum;
if (msgnum <= 0) return;
recipients[0] = 0;
int config_lines = num_tokens(ld->netconf, '\n');
- for (int i=0; i<config_lines; ++i) {
+ for (i=0; i<config_lines; ++i) {
extract_token(buf, ld->netconf, i, '\n', sizeof buf);
if (!strncasecmp(buf, "listrecp|", 9)) {
if (recipients[0] != 0) {
syslog(LOG_DEBUG, "listdeliver: new lastsent is %ld", ld.msgnum);
// Update this room's netconfig with the updated lastsent
+ begin_critical_section(S_NETCONFIGS);
netconfig = LoadRoomNetConfigFile(CC->room.QRnumber);
if (!netconfig) {
netconfig = strdup("");
// Write the new netconfig back to disk
SaveRoomNetConfigFile(CC->room.QRnumber, newnetconfig);
+ end_critical_section(S_NETCONFIGS);
free(newnetconfig); // this was the new netconfig, free it because we're done with it
}
}