From 1fdafa533f1f8aa20503a010a900cf3d71042a36 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 20 Sep 2011 09:47:56 -0400 Subject: [PATCH] serv_extnotify now uses field '2' instead of field 'W' within the server; resolve conflict with the use of 'W' for references --- citadel/modules/extnotify/extnotify_main.c | 12 ++++++------ citadel/msgbase.c | 2 +- citadel/techdoc/hack.txt | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/citadel/modules/extnotify/extnotify_main.c b/citadel/modules/extnotify/extnotify_main.c index e848df490..a01753034 100644 --- a/citadel/modules/extnotify/extnotify_main.c +++ b/citadel/modules/extnotify/extnotify_main.c @@ -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); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index a58093bbe..2442afac9 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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); } diff --git a/citadel/techdoc/hack.txt b/citadel/techdoc/hack.txt index 6ef45adf4..20e45a549 100644 --- a/citadel/techdoc/hack.txt +++ b/citadel/techdoc/hack.txt @@ -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 -- 2.30.2