Route all access to cm_fields[] through api functions
[citadel.git] / citadel / modules / extnotify / extnotify_main.c
index 826704cf45a68d771c0bfba7529d3eaf11b1f5b2..6d865082ca7f30e0d5b9cf41958bf273834c4f28 100644 (file)
@@ -154,6 +154,7 @@ eNotifyType extNotify_getConfigMessage(char *username,
        int num_msgs = 0;
        int a;
        char *configMsg;
+       long clen;
        char *pch;
 
        // Get the user
@@ -204,8 +205,7 @@ eNotifyType extNotify_getConfigMessage(char *username,
        // Do a simple string search to see if 'funambol' is selected as the
        // type. This string would be at the very top of the message contents.
 
-       configMsg = msg->cm_fields[eMesageText];
-       msg->cm_fields[eMesageText] = NULL;
+       CM_GetAsField(msg, eMesageText, &configMsg, &clen);
        CtdlFreeMessage(msg);
 
        /* here we would find the pager number... */