/*!
* \brief Process messages in the external notification queue
*/
-void process_notify(long msgnum, void *usrdata)
+void process_notify(long NotifyMsgnum, void *usrdata)
{
+ long msgnum;
long todelete[1];
int fnblAllowed;
int extPagerAllowedHttp;
NotifyHostList = (StrBuf**) usrdata;
- msg = CtdlFetchMessage(msgnum, 1);
+ msg = CtdlFetchMessage(NotifyMsgnum, 1);
if ( msg->cm_fields['W'] == NULL) {
goto nuke;
}
fnblAllowed = strncasecmp(configMsg, HKEY(FUNAMBOL_CONFIG_TEXT));
extPagerAllowedHttp = strncasecmp(configMsg, HKEY(PAGER_CONFIG_HTTP));
extPagerAllowedSystem = strncasecmp(configMsg, HKEY(PAGER_CONFIG_SYSTEM));
-
+ pch = strstr(msg->cm_fields['M'], "msgid|");
+ if (pch != NULL)
+ msgnum = atol(pch + sizeof("msgid"));
if (fnblAllowed == 0) {
char remoteurl[SIZ];
snprintf(remoteurl, SIZ, "http://%s@%s:%d/%s",
nuke:
CtdlFreeMessage(msg);
memset(configMsg, 0, sizeof(configMsg));
- todelete[0] = msgnum;
+ todelete[0] = NotifyMsgnum;
CtdlDeleteMessages(FNBL_QUEUE_ROOM, todelete, 1, "");
}