summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-06-18 09:19:58 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-06-18 09:19:58 +0000
commit4e6dd6baa89f383b3895cb3a481b092c8d52f3c4 (patch)
tree9ba61b3b8f3fd95e3ae4a878c105f123d42408b0
parent7b37844d291e6ec6c33b94a6a7d8ad140b019864 (diff)
Re #1535: Added check if module "mod-stateful-util" has been unregistered.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4169 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsip/sip_util_statefull.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_util_statefull.c b/pjsip/src/pjsip/sip_util_statefull.c
index 375fb74a..9036a027 100644
--- a/pjsip/src/pjsip/sip_util_statefull.c
+++ b/pjsip/src/pjsip/sip_util_statefull.c
@@ -59,7 +59,10 @@ static void mod_util_on_tsx_state(pjsip_transaction *tsx, pjsip_event *event)
{
struct tsx_data *tsx_data;
- if (event->type != PJSIP_EVENT_TSX_STATE)
+ /* Check if the module has been unregistered (see ticket #1535) and also
+ * verify the event type.
+ */
+ if (mod_stateful_util.id < 0 || event->type != PJSIP_EVENT_TSX_STATE)
return;
tsx_data = (struct tsx_data*) tsx->mod_data[mod_stateful_util.id];