cleanup
[citadel.git] / citadel / sysdep.c
index 1a30b4df769a3dae66824e09d0c27b424aa9fdd1..53c695615cd5a8f47a6f25abd1db2cd23dfe30ef 100644 (file)
@@ -634,10 +634,7 @@ int client_getln(char *buf, int bufsize)
 /*
  * Cleanup any contexts that are left lying around
  */
-
-
-void close_masters (void)
-{
+void close_masters(void) {
        struct ServiceFunctionHook *serviceptr;
        const char *Text;
 
@@ -647,8 +644,7 @@ void close_masters (void)
        for (serviceptr = ServiceHookTable; serviceptr != NULL;
            serviceptr = serviceptr->next ) {
 
-               if (serviceptr->tcp_port > 0)
-               {
+               if (serviceptr->tcp_port > 0) {
                        if (serviceptr->msock == -1) {
                                Text = "not closing again";
                        }
@@ -663,8 +659,7 @@ void close_masters (void)
                        serviceptr->tcp_port = 0;
                }
                
-               if (serviceptr->sockpath != NULL)
-               {
+               if (serviceptr->sockpath != NULL) {
                        if (serviceptr->msock == -1) {
                                Text = "not closing again";
                        }
@@ -678,8 +673,7 @@ void close_masters (void)
                        );
                }
 
-                if (serviceptr->msock != -1)
-               {
+                if (serviceptr->msock != -1) {
                        close(serviceptr->msock);
                        serviceptr->msock = -1;
                }
@@ -697,25 +691,11 @@ void close_masters (void)
  * The system-dependent part of master_cleanup() - close the master socket.
  */
 void sysdep_master_cleanup(void) {
-       
        close_masters();
-       
        context_cleanup();
-       
 #ifdef HAVE_OPENSSL
        destruct_ssl();
 #endif
-       CtdlDestroyProtoHooks();
-       CtdlDestroyDeleteHooks();
-       CtdlDestroyXmsgHooks();
-       CtdlDestroyUserHooks();
-       CtdlDestroyMessageHook();
-       CtdlDestroyCleanupHooks();
-       CtdlDestroyFixedOutputHooks();  
-       CtdlDestroySessionHooks();
-       CtdlDestroyServiceHook();
-       CtdlDestroyRoomHooks();
-       CtdlDestroySearchHooks();
 }
 
 
@@ -811,11 +791,8 @@ void start_daemon(int unused) {
 }
 
 
-
-void checkcrash(void)
-{
-       if (nFireUpsNonRestart != nFireUps)
-       {
+void checkcrash(void) {
+       if (nFireUpsNonRestart != nFireUps) {
                StrBuf *CrashMail;
                CrashMail = NewStrBuf();
                syslog(LOG_ALERT, "sysdep: posting crash message");
@@ -861,9 +838,7 @@ int convert_login(char NameToConvert[]) {
 }
 
 
-
-void HuntBadSession(void)
-{
+void HuntBadSession(void) {
        int highest;
        CitContext *ptr;
        fd_set readfds;