serv_extnotify now uses field '2' instead of field 'W' within the server; resolve...
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Sep 2011 13:47:56 +0000 (09:47 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 20 Sep 2011 14:37:04 +0000 (14:37 +0000)
citadel/modules/extnotify/extnotify_main.c
citadel/msgbase.c
citadel/techdoc/hack.txt

index aa85ab6..616209f 100644 (file)
@@ -267,9 +267,9 @@ void process_notify(long NotifyMsgnum, void *usrdata)
        Ctx = (NotifyContext*) usrdata;
 
        msg = CtdlFetchMessage(NotifyMsgnum, 1);
-       if ( msg->cm_fields['W'] != NULL) 
+       if ( msg->cm_fields['2'] != NULL) 
        {
-               Type = extNotify_getConfigMessage(msg->cm_fields['W'], &PagerNo, &FreeMe);
+               Type = extNotify_getConfigMessage(msg->cm_fields['2'], &PagerNo, &FreeMe);
        
                pch = strstr(msg->cm_fields['M'], "msgid|");
                if (pch != NULL) 
@@ -290,7 +290,7 @@ void process_notify(long NotifyMsgnum, void *usrdata)
                        notify_http_server(remoteurl, 
                                           file_funambol_msg,
                                           strlen(file_funambol_msg),/*GNA*/
-                                          msg->cm_fields['W'], 
+                                          msg->cm_fields['2'], 
                                           msg->cm_fields['I'],
                                           msgnum, 
                                           NULL);
@@ -324,7 +324,7 @@ void process_notify(long NotifyMsgnum, void *usrdata)
                                notify_http_server(URLBuf, 
                                                   ChrPtr(FileBuf),
                                                   StrLength(FileBuf),
-                                                  msg->cm_fields['W'], 
+                                                  msg->cm_fields['2'], 
                                                   msg->cm_fields['I'],
                                                   msgnum, 
                                                   NULL);
@@ -337,9 +337,9 @@ void process_notify(long NotifyMsgnum, void *usrdata)
                        int commandSiz;
                        char *command;
 
-                       commandSiz = sizeof(config.c_pager_program) + strlen(PagerNo) + strlen(msg->cm_fields['W']) + 5;
+                       commandSiz = sizeof(config.c_pager_program) + strlen(PagerNo) + strlen(msg->cm_fields['2']) + 5;
                        command = malloc(commandSiz);
-                       snprintf(command, commandSiz, "%s %s -u %s", config.c_pager_program, PagerNo, msg->cm_fields['W']);
+                       snprintf(command, commandSiz, "%s %s -u %s", config.c_pager_program, PagerNo, msg->cm_fields['2']);
                        system(command);
                        free(command);
                }
index 1bff449..83b859b 100644 (file)
@@ -3254,7 +3254,7 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,       /* message to save */
                                        imsg->cm_fields['A'] = strdup("Citadel");
                                        imsg->cm_fields['J'] = strdup("do not journal");
                                        imsg->cm_fields['M'] = instr;   /* imsg owns this memory now */
-                                       imsg->cm_fields['W'] = strdup(recipient);
+                                       imsg->cm_fields['2'] = strdup(recipient);
                                        CtdlSubmitMsg(imsg, NULL, FNBL_QUEUE_ROOM, 0);
                                        CtdlFreeMessage(imsg);
                                }
index 6ef45ad..20e45a5 100644 (file)
@@ -274,9 +274,8 @@ S       Special field   Only meaningful for messages being spooled over a
                        -> "S" followed by "CANCEL" means that this message
                           should be deleted from the local message base once
                           it has been replicated to all network systems.
-T      date/Time       A 32-bit integer containing the date and time of
-                        the message in standard UNIX format (the number
-                        of seconds since January 1, 1970 GMT).
+T      date/Time       Unix timestamp containing the creation date/time of
+                       the message.
 U       sUbject         Optional.  Developers may choose whether they wish to
                         generate or display subject fields.
 V      enVelope-to     The recipient specified in incoming SMTP messages.
@@ -293,6 +292,7 @@ Y   carbon copY     Optional, and only in Mail messages.
                        message looks like spam, etc.)
 1      suppress index  The presence of this field indicates that the message is
                        disqualified from being added to the full text index.
+2      extnotify       Used internally by the serv_extnotify module.
   
                        EXAMPLE