From 42f6476683561cfac3b76167b34bdb17964c82ac Mon Sep 17 00:00:00 2001 From: Yun Liu <yun@yun.(none)> Date: Sun, 28 Sep 2008 23:47:00 -0400 Subject: [PATCH] Remove useless pisip module(Also fix a bug that multiple callbacks of mod_on_rx_request are called when there is an incoming call) --- src/useragent.cpp | 8 ++++---- src/useragent.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/useragent.cpp b/src/useragent.cpp index 72cc123947..bc14c3d60b 100644 --- a/src/useragent.cpp +++ b/src/useragent.cpp @@ -194,17 +194,17 @@ pj_status_t UserAgent::sipInit() { status = pjsip_xfer_init_module(_endpt); PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); - { + /*{ const pjsip_module handler ={ NULL, NULL, // prev, next. - { (char*)"mod-pjsua-options", 9}, // Name. + { (char*)"mod-sflphone-options", 20},//9}, // Name. -1, // Id PJSIP_MOD_PRIORITY_APPLICATION, // Priority NULL, // load() NULL, // start() NULL, // stop() NULL, // unload() - &mod_on_rx_request, // on_rx_request() + &options_on_rx_request, // on_rx_request() NULL, // on_tx_request. NULL, // on_tx_response() NULL, // on_tsx_state() @@ -223,7 +223,7 @@ pj_status_t UserAgent::sipInit() { PJSIP_H_ALLOW, NULL, 1, &STR_OPTIONS); - PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 ); + PJ_ASSERT_RETURN( status == PJ_SUCCESS, 1 );*/ // Initialize invite session module diff --git a/src/useragent.h b/src/useragent.h index 664f59117b..3c3273248b 100644 --- a/src/useragent.h +++ b/src/useragent.h @@ -139,7 +139,6 @@ public: pj_pool_t *getAppPool() {return _pool;} static pj_bool_t mod_on_rx_request(pjsip_rx_data *rdata); static pj_bool_t mod_on_rx_response(pjsip_rx_data *rdata) {return PJ_SUCCESS;} - static pj_bool_t options_on_rx_request(pjsip_rx_data *rdata) {return PJ_SUCCESS;} static void regc_cb(struct pjsip_regc_cbparam *param); static void xfer_func_cb( pjsip_evsub *sub, pjsip_event *event); static void xfer_svr_cb(pjsip_evsub *sub, pjsip_event *event); -- GitLab