Module: sip-router Branch: master Commit: a2afc3d42224d0c35e4867ad50251e7aa6231879 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a2afc3d4...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sat May 25 15:42:14 2013 +0200
core: filled sctp core api
- cleanup of not needed members
---
sctp_core.c | 29 ++++++++++------------------- sctp_core.h | 2 -- 2 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/sctp_core.c b/sctp_core.c index 19ffda6..49b1da6 100644 --- a/sctp_core.c +++ b/sctp_core.c @@ -44,29 +44,20 @@ int sctp_core_init(void) */ void sctp_core_destroy(void) { -} - -/** - * - */ -int sctp_core_init_sock(struct socket_info* sock_info) -{ - return 0; -} + if(_sctp_srapi_set==0) { + LM_INFO("SCTP API not initialized\n"); + return; + }
-/** - * - */ -void sctp_core_init_options(void) -{ + _sctp_srapi.destroy(); }
/** * */ -int sctp_core_check_compiled_sockopts(char* buf, int size) +int sctp_core_init_sock(struct socket_info* sock_info) { - return 0; + return _sctp_srapi.init_sock(sock_info); }
/** @@ -74,7 +65,7 @@ int sctp_core_check_compiled_sockopts(char* buf, int size) */ int sctp_core_check_support(void) { - return 0; + return _sctp_srapi.check_support(); }
/** @@ -82,7 +73,7 @@ int sctp_core_check_support(void) */ int sctp_core_rcv_loop(void) { - return 0; + return _sctp_srapi.rcv_loop(); }
/** @@ -90,7 +81,7 @@ int sctp_core_rcv_loop(void) */ int sctp_core_msg_send(struct dest_info* dst, char* buf, unsigned len) { - return 0; + return _sctp_srapi.msg_send(dst, buf, len); }
/** diff --git a/sctp_core.h b/sctp_core.h index 362dd38..88e0470 100644 --- a/sctp_core.h +++ b/sctp_core.h @@ -52,8 +52,6 @@ typedef struct sctp_srapi { sctp_srapi_init_f init; sctp_srapi_destroy_f destroy; sctp_srapi_init_sock_f init_sock; - sctp_srapi_init_options_f init_options; - sctp_srapi_check_compiled_sockopts_f check_compiled_sockopts; sctp_srapi_check_support_f check_support; sctp_srapi_rcv_loop_f rcv_loop; sctp_srapi_msg_send_f msg_send;