Browse code

tls: don't start if tcp is in async mode

- added check for tcp async mode on startup. If tcp is in async
mode and tls_force_run is not set, refuse to start and print an
error message (tls does not support yet tcp async mode).

Andrei Pelinescu-Onciul authored on 20/04/2009 14:22:54
Showing 1 changed files
... ...
@@ -308,6 +308,12 @@ static int mod_init(void)
308 308
 				"(set enable_tls=1 in the config to enable it)\n");
309 309
 		return 0;
310 310
 	}
311
+
312
+	if (cfg_get(tcp, tcp_cfg, async) && !tls_force_run){
313
+		ERR("tls does not support tcp in async mode, please use"
314
+				" tcp_async=no in the config file\n");
315
+		return -1;
316
+	}
311 317
 	     /* Convert tls_method parameter to integer */
312 318
 	method = tls_parse_method(&tls_method);
313 319
 	if (method < 0) {