Browse code

core: safety check for initialized SCTP API

- reported by Juha Heinanen

Daniel-Constantin Mierla authored on 26/05/2013 08:12:24
Showing 1 changed files
... ...
@@ -65,6 +65,12 @@ int sctp_core_init_sock(struct socket_info* sock_info)
65 65
  */
66 66
 int sctp_core_check_support(void)
67 67
 {
68
+	if(_sctp_srapi_set==0) {
69
+		LM_INFO("SCTP API not enabled"
70
+				" - if you want to use it, load sctp module\n");
71
+		return -1;
72
+	}
73
+
68 74
 	return _sctp_srapi.check_support();
69 75
 }
70 76