- CtdlMailboxName(configRoomName, sizeof configRoomName, &user, USERCONFIGROOM);
- // Fill qrbuf
- CtdlGetRoom(&qrbuf, configRoomName);
- /* Do something really, really stoopid here. Raid the room on ourselves,
- * loop through the messages manually and find it. I don't want
- * to use a CtdlForEachMessage callback here, as we would be
- * already in one */
- cdbfr = cdb_fetch(CDB_MSGLISTS, &qrbuf.QRnumber, sizeof(long));
- if (cdbfr != NULL) {
- msglist = (long *) cdbfr->ptr;
- cdbfr->ptr = NULL; /* CtdlForEachMessage() now owns this memory */
- num_msgs = cdbfr->len / sizeof(long);
- cdb_free(cdbfr);
- } else {
- CtdlLogPrintf(CTDL_DEBUG, "extNotify_getConfigMessage: No config messages found\n");
- return -1; /* No messages at all? No further action. */
- }
- for (a = 0; a < num_msgs; ++a) {
- msg = CtdlFetchMessage(msglist[a], 1);
- if (msg != NULL) {
- if ((msg->cm_fields['U'] != NULL) &&
- (strncasecmp(msg->cm_fields['U'], PAGER_CONFIG_MESSAGE,
- strlen(PAGER_CONFIG_MESSAGE)) == 0)) {
- confMsgNum = msglist[a];
- }
- CtdlFreeMessage(msg);
- }
+ memset(&Ctx, 0, sizeof(NotifyContext));
+ Ctx.NotifyHostList = GetNotifyHosts();
+ if (CtdlGetRoom(&CC->room, FNBL_QUEUE_ROOM) != 0) {
+ CtdlLogPrintf(CTDL_ERR, "Cannot find room <%s>\n", FNBL_QUEUE_ROOM);
+ CtdlClearSystemContext();
+ return;