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)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Sep 2011 13:47:56 +0000 (09:47 -0400)
citadel/modules/extnotify/extnotify_main.c
citadel/msgbase.c
citadel/techdoc/hack.txt

index e848df490d8231691a2522130d794c980edb43aa..a0175303410a4b4063d4778cca673821171d0afa 100644 (file)
@@ -233,11 +233,11 @@ 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) {
                goto nuke;
        }
     
-       configMsgNum = extNotify_getConfigMessage(msg->cm_fields['W']);
+       configMsgNum = extNotify_getConfigMessage(msg->cm_fields['2']);
     
        extNotify_getPrefs(configMsgNum, &configMsg[0]);
        
@@ -275,7 +275,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, 
                                   Ctx);
@@ -305,7 +305,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, 
                                           Ctx);
@@ -319,9 +319,9 @@ void process_notify(long NotifyMsgnum, void *usrdata)
                char *command;
 
                number = strtok(configMsg, "textmessage\n");
-               commandSiz = sizeof(config.c_pager_program) + strlen(number) + strlen(msg->cm_fields['W']) + 5;
+               commandSiz = sizeof(config.c_pager_program) + strlen(number) + strlen(msg->cm_fields['2']) + 5;
                command = malloc(commandSiz);
-               snprintf(command, commandSiz, "%s %s -u %s", config.c_pager_program, number, msg->cm_fields['W']);
+               snprintf(command, commandSiz, "%s %s -u %s", config.c_pager_program, number, msg->cm_fields['2']);
                system(command);
                free(command);
        }
index a58093bbe38e6197b66f4dd0f2b2ca473eb2d9ce..2442afac9066342cac63bdd115f330c547e937b0 100644 (file)
@@ -3210,7 +3210,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 6ef45adf473bfc606b5bd144d7ba57b817473cc1..20e45a5498d4e12bb68509c80ef20117f1e6104a 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