]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/instmsg/serv_instmsg.c
CM_SetField() no longer accepts a length, just uses strdup()
[citadel.git] / citadel / server / modules / instmsg / serv_instmsg.c
index afb9e5b8ece7887f2edd9a167a0053e6c2aa3353..cc93953776684fbc876b81ab1ee8384deb35b6da 100644 (file)
@@ -1,6 +1,6 @@
 // This module handles instant messaging between users.
 // 
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2023 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or disclosure
 // is subject to the terms of the GNU General Public License, version 3.
@@ -404,16 +404,16 @@ void flush_individual_conversation(struct imlog *im) {
        msg->cm_anon_type = MES_NORMAL;
        msg->cm_format_type = FMT_RFC822;
        if (!IsEmptyStr(im->usernames[0])) {
-               CM_SetField(msg, eAuthor, im->usernames[0], strlen(im->usernames[0]));
+               CM_SetField(msg, eAuthor, im->usernames[0]);
        }
        else {
-               CM_SetField(msg, eAuthor, HKEY("Citadel"));
+               CM_SetField(msg, eAuthor, "Citadel");
        }
        if (!IsEmptyStr(im->usernames[1])) {
-               CM_SetField(msg, eRecipient, im->usernames[1], strlen(im->usernames[1]));
+               CM_SetField(msg, eRecipient, im->usernames[1]);
        }
 
-       CM_SetField(msg, eOriginalRoom, HKEY(PAGELOGROOM));
+       CM_SetField(msg, eOriginalRoom, PAGELOGROOM);
        CM_SetAsFieldSB(msg, eMesageText, &FullMsgBuf); /* we own this memory now */
 
        // Start with usernums[1] because it's guaranteed to be higher than usernums[0],