fix type for sizeof; it shouldn't be the pointer.
[citadel.git] / citadel / modules / imap / serv_imap.c
index 46a6ba7d94591183cc231dfade9ee22db3183649..7fb85e7f7124f563b8b53eb514d64eefb8cfc3a3 100644 (file)
@@ -293,7 +293,7 @@ void imap_add_single_msgid(long msgnum, void *userdata)
        if (Imap->num_msgs > Imap->num_alloc) {
                Imap->num_alloc += REALLOC_INCREMENT;
                Imap->msgids = realloc(Imap->msgids, (Imap->num_alloc * sizeof(long)) );
-               Imap->flags = realloc(Imap->flags, (Imap->num_alloc * sizeof(long)) );
+               Imap->flags = realloc(Imap->flags, (Imap->num_alloc * sizeof(unsigned int)) );
        }
        Imap->msgids[Imap->num_msgs - 1] = msgnum;
        Imap->flags[Imap->num_msgs - 1] = 0;
@@ -328,7 +328,7 @@ void imap_load_msgids(void)
        }
 
        if (Imap->num_msgs) {
-               Imap->flags = malloc(Imap->num_alloc * sizeof(long));
+               Imap->flags = malloc(Imap->num_alloc * sizeof(unsigned int));
                memset(Imap->flags, 0, (Imap->num_alloc * sizeof(long)) );
        }
 
@@ -1721,7 +1721,7 @@ CTDL_MODULE_INIT(imap)
                CtdlRegisterServiceHook(config.c_imaps_port,
                                        NULL, imaps_greeting, imap_command_loop, NULL, CitadelServiceIMAPS);
 #endif
-               CtdlRegisterSessionHook(imap_cleanup_function, EVT_STOP);
+               CtdlRegisterSessionHook(imap_cleanup_function, EVT_STOP, PRIO_STOP + 30);
                CtdlRegisterCleanupHook(imap_cleanup);
        }