Module: sip-router
Branch: master
Commit: a85e7e5c192e4f597d17c98f4036d83639c6bc1f
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a85e7e5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun May 26 10:12:24 2013 +0200
core: safety check for initialized SCTP API
- reported by Juha Heinanen
---
sctp_core.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sctp_core.c b/sctp_core.c
index 49b1da6..a27f603 100644
--- a/sctp_core.c
+++ b/sctp_core.c
@@ -65,6 +65,12 @@ int sctp_core_init_sock(struct socket_info* sock_info)
*/
int sctp_core_check_support(void)
{
+ if(_sctp_srapi_set==0) {
+ LM_INFO("SCTP API not enabled"
+ " - if you want to use it, load sctp module\n");
+ return -1;
+ }
+
return _sctp_srapi.check_support();
}