Bladeren bron

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
Daniel-Constantin Mierla 9 jaren geleden
bovenliggende
commit
81ec422227
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      modules/tsilo/ts_handlers.c

+ 3 - 0
modules/tsilo/ts_handlers.c

@@ -21,6 +21,8 @@
 
 
 #include <string.h>
 #include <string.h>
 
 
+#include "../../sr_module.h"
+
 #include "ts_hash.h"
 #include "ts_hash.h"
 #include "ts_handlers.h"
 #include "ts_handlers.h"
 
 
@@ -63,6 +65,7 @@ void ts_onreply(struct cell* t, int type, struct tmcb_params *param)
 	ts_transaction_t *cb_ptr, *ptr;
 	ts_transaction_t *cb_ptr, *ptr;
 
 
 	if(t_table==0) return;
 	if(t_table==0) return;
+	if((type & (TMCB_DESTROY)) && destroy_modules_phase()) return;
 
 
 	cb_ptr = (ts_transaction_t*)(*param->param);
 	cb_ptr = (ts_transaction_t*)(*param->param);
 	if (cb_ptr == NULL) {
 	if (cb_ptr == NULL) {