imap_misc.c: imap_append() was trying to append the flags after the room had been restored to the original room, so all flags in the room were being cleared. Moved imap_do_append_flags() before the room was changed back.
user_ops.c: purge_user() was assuming that the first part of the key for Visit records was the user number. Actually is the room number so was removing records where the room and user numbers matched. A solution is to go through all the Visit records and delete, but not worth it. Auto-Purge will clean up the records later. Future: When expanded IMAP flagging is added, we will move the user number to the top of the key and reactivate the existing method.
ctdl3264_prep.sh: Build fix to support ‘tail’ command version differences for + option. CentOS/Rocky Linux needs -n option added for command not to error. Now tests command and sets the proper option to work.
new_msgnum = CtdlSubmitMsg(msg, NULL, "");
}
if (new_msgnum >= 0L) {
new_msgnum = CtdlSubmitMsg(msg, NULL, "");
}
if (new_msgnum >= 0L) {
+ if (IsEmptyStr(new_message_flags)) {
+ imap_do_append_flags(new_msgnum, new_message_flags);
+ }
IReplyPrintf("OK [APPENDUID %ld %ld] APPEND completed",
GLOBAL_UIDVALIDITY_VALUE, new_msgnum);
}
IReplyPrintf("OK [APPENDUID %ld %ld] APPEND completed",
GLOBAL_UIDVALIDITY_VALUE, new_msgnum);
}
/* We don't need this buffer anymore */
CM_Free(msg);
/* We don't need this buffer anymore */
CM_Free(msg);
-
- if (IsEmptyStr(new_message_flags)) {
- imap_do_append_flags(new_msgnum, new_message_flags);
- }
PerformUserHooks(&usbuf, EVT_PURGEUSER);
// delete any existing user/room relationships
PerformUserHooks(&usbuf, EVT_PURGEUSER);
// delete any existing user/room relationships
- cdb_delete(CDB_VISIT, &usbuf.usernum, sizeof(long));
+ // Commenting out since it was assuming the user number was
+ // at the top of the index. Room number is actually first.
+ // Auto-Purge will clean up the records later, so not worth
+ // scanning all the records here.
+ //cdb_delete(CDB_VISIT, &usbuf.usernum, sizeof(long));
// delete the users-by-number index record
cdb_delete(CDB_USERSBYNUMBER, &usbuf.usernum, sizeof(long));
// delete the users-by-number index record
cdb_delete(CDB_USERSBYNUMBER, &usbuf.usernum, sizeof(long));
# Source our data structures from the real live working code
SERVER_H=server/server.h
# Source our data structures from the real live working code
SERVER_H=server/server.h
+tail_opt=
+tail +1 ${SERVER_H} > /dev/null 2>&1
+if [ $? != 0 ] ; then
+ tail_opt=-n
+fi
+
# Generate the "32-bit" versions of these structures.
# Note that this is specifically for converting "32-bit to 64-bit" -- NOT "any-to-any"
convert_struct() {
start_line=$(cat ${SERVER_H} | egrep -n "^struct $1 {" | cut -d: -f1)
# Generate the "32-bit" versions of these structures.
# Note that this is specifically for converting "32-bit to 64-bit" -- NOT "any-to-any"
convert_struct() {
start_line=$(cat ${SERVER_H} | egrep -n "^struct $1 {" | cut -d: -f1)
- tail +${start_line} ${SERVER_H} | sed '/};/q' \
+ tail ${tail_opt} +${start_line} ${SERVER_H} | sed '/};/q' \
| sed s/"^struct $1 {"/"struct ${1}_32 {"/g \
| sed s/"long "/"int32_t "/g \
| sed s/"time_t "/"int32_t "/g \
| sed s/"^struct $1 {"/"struct ${1}_32 {"/g \
| sed s/"long "/"int32_t "/g \
| sed s/"time_t "/"int32_t "/g \