Module: kamailio Branch: 4.3 Commit: 0be07fc1dfaf1ee54ed8ff4820a11523e3f94376 URL: https://github.com/kamailio/kamailio/commit/0be07fc1dfaf1ee54ed8ff4820a11523...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-03-02T13:01:53+01:00
tsilo: don't execute tm callback for TMCB_DESTROY if server shutdowns
- tsilo mod_destroy will clean up, otherwise may end up in deadlock at shutdown, when a slot lock is already aquired and the callback will try to aquire again
(cherry picked from commit 81ec422227299b4cbd7aecbb58b862fc67208b30)
---
Modified: modules/tsilo/ts_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/0be07fc1dfaf1ee54ed8ff4820a11523... Patch: https://github.com/kamailio/kamailio/commit/0be07fc1dfaf1ee54ed8ff4820a11523...
---
diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c index c04ec36..aab9d74 100644 --- a/modules/tsilo/ts_handlers.c +++ b/modules/tsilo/ts_handlers.c @@ -21,6 +21,8 @@
#include <string.h>
+#include "../../sr_module.h" + #include "ts_hash.h" #include "ts_handlers.h"
@@ -61,6 +63,9 @@ 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; + if((type & (TMCB_DESTROY)) && destroy_modules_phase()) return; + cb_ptr = (ts_transaction_t*)(*param->param); if (cb_ptr == NULL) { LM_DBG("NULL param for type %d\n", type);