MODULES: add priorities in execution
[citadel.git] / citadel / modules / instmsg / serv_instmsg.c
index 84acbc4f230931baacf74674a50bf825a34c731e..040c1b42edef254d3b9c4b0fbc244336171eb594 100644 (file)
@@ -599,11 +599,11 @@ CTDL_MODULE_INIT(instmsg)
                CtdlRegisterProtoHook(cmd_sexp, "SEXP", "Send an instant message");
                CtdlRegisterProtoHook(cmd_dexp, "DEXP", "Disable instant messages");
                CtdlRegisterProtoHook(cmd_reqt, "REQT", "Request client termination");
-               CtdlRegisterSessionHook(cmd_gexp_async, EVT_ASYNC);
-               CtdlRegisterSessionHook(delete_instant_messages, EVT_STOP);
+               CtdlRegisterSessionHook(cmd_gexp_async, EVT_ASYNC, PRIO_ASYNC + 1);
+               CtdlRegisterSessionHook(delete_instant_messages, EVT_STOP, PRIO_STOP + 1);
                CtdlRegisterXmsgHook(send_instant_message, XMSG_PRI_LOCAL);
-               CtdlRegisterSessionHook(instmsg_timer, EVT_TIMER);
-               CtdlRegisterSessionHook(instmsg_shutdown, EVT_SHUTDOWN);
+               CtdlRegisterSessionHook(instmsg_timer, EVT_TIMER, PRIO_CLEANUP + 400);
+               CtdlRegisterSessionHook(instmsg_shutdown, EVT_SHUTDOWN, PRIO_SHUTDOWN + 10);
        }
        
        /* return our module name for the log */