[sr-dev] git:master:94da0d64: tsilo: check if tsilo hash table is still set when executing tm callback
Daniel-Constantin Mierla
miconda at gmail.com
Wed Dec 30 17:43:17 CET 2015
Module: kamailio
Branch: master
Commit: 94da0d648805b958d266b789015f66cef8628ae4
URL: https://github.com/kamailio/kamailio/commit/94da0d648805b958d266b789015f66cef8628ae4
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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);
More information about the sr-dev
mailing list