QUEUE-Rooms: give it an own view.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Feb 2012 23:46:07 +0000 (00:46 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 5 Feb 2012 23:46:07 +0000 (00:46 +0100)
  - give the STMP and the FNBWL room the view type QUEUE
  - don't schedule QUEUE - rooms for networking
  - migrate current rooms on upgrade
  - create them with the QUEUE view.

citadel/modules/extnotify/extnotify_main.c
citadel/modules/network/serv_network.c
citadel/modules/smtp/serv_smtpqueue.c
citadel/modules/upgrade/serv_upgrade.c
libcitadel/lib/libcitadel.h

index 51e4e13e55db56f13db479d9c555a7367843f290..8d99f6f1cc6f170ddcfbd00d194c598501485e21 100644 (file)
@@ -451,7 +451,7 @@ void do_extnotify_queue(void)
 void create_extnotify_queue(void) {
        struct ctdlroom qrbuf;
 
-       CtdlCreateRoom(FNBL_QUEUE_ROOM, 3, "", 0, 1, 0, VIEW_MAILBOX);
+       CtdlCreateRoom(FNBL_QUEUE_ROOM, 3, "", 0, 1, 0, VIEW_QUEUE);
 
        CtdlFillSystemContext(&extnotify_queue_CC, "Extnotify");
 
index ba87cca5e4ce42d43f563e7bed570154a704f741..b32535ccbc9aa2616e978a941ef5b927dbce76df 100644 (file)
@@ -327,6 +327,8 @@ void network_queue_room(struct ctdlroom *qrbuf, void *data) {
        int i;
        struct RoomProcList *ptr;
 
+       if (qrbuf->QRdefaultview == VIEW_QUEUE)
+               return;
        ptr = (struct RoomProcList *) malloc(sizeof (struct RoomProcList));
        if (ptr == NULL) return;
 
index 72e5bc231d60a0b1b47c7dd00239cdb4cebb765e..4853950445dd41cf3f607b1f8c969c24f01da98d 100644 (file)
@@ -904,7 +904,7 @@ void smtp_init_spoolout(void) {
         * Create the room.  This will silently fail if the room already
         * exists, and that's perfectly ok, because we want it to exist.
         */
-       CtdlCreateRoom(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0, VIEW_MAILBOX);
+       CtdlCreateRoom(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0, VIEW_QUEUE);
 
        /*
         * Make sure it's set to be a "system room" so it doesn't show up
index ebd48a213590f329fa7a85efa2fd77dee92caca0..e4a527869a88e17b030f02a4370684c1ad3e4291 100644 (file)
@@ -291,6 +291,10 @@ void update_config(void) {
                config.c_xmpp_s2s_port = 5269;
        }
 
+       if (CitControl.version < 725) {
+
+
+       }
        if (IsEmptyStr(config.c_default_cal_zone)) {
                guess_time_zone();
        }
@@ -345,6 +349,18 @@ void check_server_upgrades(void) {
        if (CitControl.version < 790) {
                remove_thread_users();
        }
+       if (CitControl.version < 810) {
+               struct ctdlroom QRoom;
+               if (!CtdlGetRoom(&QRoom, SMTP_SPOOLOUT_ROOM)) {
+                       QRoom.QRdefaultview = VIEW_QUEUE;
+                       CtdlPutRoom(&QRoom);
+               }
+               if (!CtdlGetRoom(&QRoom, FNBL_QUEUE_ROOM)) {
+                       QRoom.QRdefaultview = VIEW_QUEUE;
+                       CtdlPutRoom(&QRoom);
+               }
+       }
+
        CitControl.version = REV_LEVEL;
 
        /*
index d28e7662140d0bc2a975eafc5e6e7487a4862ca5..7f3da262d78b2ac5d407a1318142c2a1e6514f94 100644 (file)
@@ -98,6 +98,7 @@ typedef enum _room_views {
        VIEW_JOURNAL            = 8,    /* Journal view */
        VIEW_DRAFTS             = 9,    /* Drafts view */
        VIEW_BLOG               = 10,   /* Blog view */
+       VIEW_QUEUE              = 11,   /* SMTP/... QUEUE rooms */
        VIEW_MAX
 } ROOM_VIEWS;