Module: sip-router Branch: ser_modules Commit: d9b7afae582a4d497eddc6eacbbc1690d030cbb4 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d9b7afae...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@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_s/tls/tls_mod.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules_s/tls/tls_mod.c b/modules_s/tls/tls_mod.c index 7c1b56a..a68a6c6 100644 --- a/modules_s/tls/tls_mod.c +++ b/modules_s/tls/tls_mod.c @@ -301,6 +301,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) {