serv_extnotify now uses field '2' instead of field 'W' within the server; resolve...
[citadel.git] / citadel / modules / extnotify / extnotify_main.c
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);
        }