Browse code

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

Andrei Pelinescu-Onciul authored on 24/01/2007 18:01:54
Showing 1 changed files
... ...
@@ -1523,15 +1523,6 @@ try_again:
1523 1523
 			goto error;
1524 1524
 		}
1525 1525
 	}
1526
-#ifdef USE_TLS
1527
-	if (!tls_disable){
1528
-		/* init tls*/
1529
-		if (init_tls()<0){
1530
-			LOG(L_CRIT, "could not initialize tls, exiting...\n");
1531
-			goto error;
1532
-		}
1533
-	}
1534
-#endif /* USE_TLS */
1535 1526
 #endif /* USE_TCP */
1536 1527
 	/* init_daemon? */
1537 1528
 	if (!dont_fork){
... ...
@@ -1559,6 +1550,17 @@ try_again:
1559 1559
 	 * processes registered from the modules*/
1560 1560
 	if (init_pt(calc_proc_no())==-1)
1561 1561
 		goto error;
1562
+#ifdef USE_TCP
1563
+#ifdef USE_TLS
1564
+	if (!tls_disable){
1565
+		/* init tls*/
1566
+		if (init_tls()<0){
1567
+			LOG(L_CRIT, "could not initialize tls, exiting...\n");
1568
+			goto error;
1569
+		}
1570
+	}
1571
+#endif /* USE_TLS */
1572
+#endif /* USE_TCP */
1562 1573
 	
1563 1574
 	/* The total number of processes is now known, note that no
1564 1575
 	 * function being called before this point may rely on the