highest_msg = msglist[num_msgs - 1];
/* Write it back to disk. */
- cdb_store(CDB_MSGLISTS, &CC->room.QRnumber, (int)sizeof(long),
- msglist, (int)(num_msgs * sizeof(long)));
+ cdb_store(CDB_MSGLISTS, &CC->room.QRnumber, (int)sizeof(long), msglist, (int)(num_msgs * sizeof(long)));
/* Free up the memory we used. */
free(msglist);
* This is the same as CtdlSaveMsgPointersInRoom() but it only accepts
* a single message.
*/
-int CtdlSaveMsgPointerInRoom(char *roomname, long msgid,
- int do_repl_check, struct CtdlMessage *supplied_msg)
-{
+int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *supplied_msg) {
return CtdlSaveMsgPointersInRoom(roomname, &msgid, 1, do_repl_check, supplied_msg, 0);
}
}
else {
if (is_bigmsg) {
- retval = cdb_store(CDB_BIGMSGS,
- &msgid,
- (int)sizeof(long),
- holdM,
- (holdMLen + 1)
- );
+ retval = cdb_store(CDB_BIGMSGS, &msgid, (int)sizeof(long), holdM, (holdMLen + 1));
if (retval < 0) {
syslog(LOG_ERR, "msgbase: failed to store message body for msgid %ld: %ld", msgid, retval);
}
/* Free the memory we used for the serialized message */
free(smr.ser);
-
return(retval);
}