[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    [sr-dev] git:master:94da0d64: tsilo: check if tsilo hash table is still set when executing tm callba
From:       Daniel-Constantin Mierla <miconda () gmail ! com>
Date:       2015-12-30 16:43:17
Message-ID: E1aEJqH-0004h2-5h () www ! kamailio ! org
[Download RAW message or body]

Module: kamailio
Branch: master
Commit: 94da0d648805b958d266b789015f66cef8628ae4
URL: https://github.com/kamailio/kamailio/commit/94da0d648805b958d266b789015f66cef8628ae4

Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date: 2015-12-30T17:41:18+01:00

tsilo: check if tsilo hash table is still set when executing tm callback

- freeing the transaction structure by tm at shutdown can execute this
  callback, resulting in core dump (at shutdonw) if tsilo destroyed its
  hash table already

---

Modified: modules/tsilo/ts_handlers.c

---

Diff:  https://github.com/kamailio/kamailio/commit/94da0d648805b958d266b789015f66cef8628ae4.diff
Patch: https://github.com/kamailio/kamailio/commit/94da0d648805b958d266b789015f66cef8628ae4.patch

---

diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c
index c04ec36..392c71a 100644
--- a/modules/tsilo/ts_handlers.c
+++ b/modules/tsilo/ts_handlers.c
@@ -25,6 +25,7 @@
 #include "ts_handlers.h"
 
 extern struct tm_binds _tmb;
+extern struct ts_table *t_table;
 
 /*!
  * \brief add transaction structure to tm callbacks
@@ -61,6 +62,8 @@ void ts_onreply(struct cell* t, int type, struct tmcb_params *param)
 	ts_entry_t* _e;
 	ts_transaction_t *cb_ptr, *ptr;
 
+	if(t_table==0) return;
+
 	cb_ptr = (ts_transaction_t*)(*param->param);
 	if (cb_ptr == NULL) {
 		LM_DBG("NULL param for type %d\n", type);


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic