Module: sip-router
Branch: master
Commit: 024a23ebba44e94f2e6fe588bb06ef5a84740304
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=024a23e…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Apr 20 14:22:54 2009 +0000
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).
---
modules/tls/tls_mod.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/tls/tls_mod.c b/modules/tls/tls_mod.c
index 436785f..7f79ce8 100644
--- a/modules/tls/tls_mod.c
+++ b/modules/tls/tls_mod.c
@@ -308,6 +308,12 @@ static int mod_init(void)
"(set enable_tls=1 in the config to enable it)\n");
return 0;
}
+
+ if (cfg_get(tcp, tcp_cfg, async) && !tls_force_run){
+ ERR("tls does not support tcp in async mode, please use"
+ " tcp_async=no in the config file\n");
+ return -1;
+ }
/* Convert tls_method parameter to integer */
method = tls_parse_method(&tls_method);
if (method < 0) {