Bläddra i källkod

- tls fix: set openssl locking functions (should be stable even under high
load, lost of connections, and multi-cpu machines)

Andrei Pelinescu-Onciul 18 år sedan
förälder
incheckning
8628de2247
1 ändrade filer med 11 tillägg och 9 borttagningar
  1. 11 9
      main.c

+ 11 - 9
main.c

@@ -1523,15 +1523,6 @@ try_again:
 			goto error;
 		}
 	}
-#ifdef USE_TLS
-	if (!tls_disable){
-		/* init tls*/
-		if (init_tls()<0){
-			LOG(L_CRIT, "could not initialize tls, exiting...\n");
-			goto error;
-		}
-	}
-#endif /* USE_TLS */
 #endif /* USE_TCP */
 	/* init_daemon? */
 	if (!dont_fork){
@@ -1559,6 +1550,17 @@ try_again:
 	 * processes registered from the modules*/
 	if (init_pt(calc_proc_no())==-1)
 		goto error;
+#ifdef USE_TCP
+#ifdef USE_TLS
+	if (!tls_disable){
+		/* init tls*/
+		if (init_tls()<0){
+			LOG(L_CRIT, "could not initialize tls, exiting...\n");
+			goto error;
+		}
+	}
+#endif /* USE_TLS */
+#endif /* USE_TCP */
 	
 	/* The total number of processes is now known, note that no
 	 * function being called before this point may rely on the