move license in mk/
[apps/pfixtools.git] / main-srsd.c
index 57835cd..bcf9fea 100644 (file)
@@ -228,8 +228,6 @@ void usage(void)
 
 int main_loop(srs_t *srs, const char *domain, int port_enc, int port_dec)
 {
-    int exitcode = EXIT_SUCCESS;
-
     if (start_listener(port_enc, false) < 0)
         return EXIT_FAILURE;
     if (start_listener(port_dec, true) < 0)
@@ -243,8 +241,7 @@ int main_loop(srs_t *srs, const char *domain, int port_enc, int port_dec)
         if (n < 0) {
             if (errno != EAGAIN && errno != EINTR) {
                 UNIXERR("epoll_wait");
-                exitcode = EXIT_FAILURE;
-                break;
+                return EXIT_FAILURE;
             }
             continue;
         }
@@ -318,7 +315,7 @@ int main_loop(srs_t *srs, const char *domain, int port_enc, int port_dec)
         }
     }
 
-    return exitcode;
+    return EXIT_SUCCESS;
 }
 
 static srs_t *srs_read_secrets(const char *sfile)
@@ -373,8 +370,6 @@ int main(int argc, char *argv[])
     int res;
     srs_t *srs;
 
-    common_initialize();
-
     for (int c = 0; (c = getopt(argc, argv, "hu" "e:d:p:")) >= 0; ) {
         switch (c) {
           case 'e':