fclose(fp);
}
- syslog(LOG_DEBUG, "diff length is %d bytes", diffbuf_len);
+ syslog(LOG_DEBUG, "diff length is "SIZE_T_FMT" bytes", diffbuf_len);
unlink(diff_old_filename);
unlink(diff_new_filename);
* but only if the client fetches the message we just generated immediately
* without first trying to perform other fetch operations.
*/
- if (CC->cached_msglist != NULL) free(CC->cached_msglist);
- CC->cached_num_msgs = 1;
+ if (CC->cached_msglist != NULL) {
+ free(CC->cached_msglist);
+ CC->cached_msglist = NULL;
+ CC->cached_num_msgs = 0;
+ }
CC->cached_msglist = malloc(sizeof(long));
- CC->cached_msglist[0] = msgnum;
+ if (CC->cached_msglist != NULL) {
+ CC->cached_num_msgs = 1;
+ CC->cached_msglist[0] = msgnum;
+ }
}
else if (!strcasecmp(operation, "revert")) {
CtdlRegisterProtoHook(cmd_wiki, "WIKI", "Commands related to Wiki management");
}
- /* return our Subversion id for the Log */
+ /* return our module name for the log */
return "wiki";
}