Module: kamailio Branch: 4.2 Commit: f7800627e169c171992a596df28c746aab4f03bc URL: https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc
Author: Chris Double <[email protected]> Committer: grumvalski <[email protected]> Date: 2015-09-23T16:13:28+02:00 tsilo: Fix pointer comparison in ts_set_tm_callbacks - Fix cloned ts_transaction pointer comparison to check for NULL rather than less than zero. The latter doesn't make sense for an allocated pointer. (cherry picked from commit e304f9d8d4cc16a3b6cca1cdd10dff6d0a18d955) --- Modified: modules/tsilo/ts_handlers.c --- Diff: https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc.diff Patch: https://github.com/kamailio/kamailio/commit/f7800627e169c171992a596df28c746aab4f03bc.patch --- diff --git a/modules/tsilo/ts_handlers.c b/modules/tsilo/ts_handlers.c index 6a1828a..c04ec36 100644 --- a/modules/tsilo/ts_handlers.c +++ b/modules/tsilo/ts_handlers.c @@ -40,14 +40,11 @@ int ts_set_tm_callbacks(struct cell *t, sip_msg_t *req, ts_transaction_t *ts) if(t==NULL) return -1; - if ( (ts_clone=clone_ts_transaction(ts)) < 0 ) { + if ( (ts_clone=clone_ts_transaction(ts)) == NULL ) { LM_ERR("failed to clone transaction\n"); return -1; } - if (ts_clone == NULL) { - LM_ERR("transaction clone null\n"); - } if ( _tmb.register_tmcb( req, t,TMCB_DESTROY, ts_onreply, (void*)ts_clone, free_ts_transaction)<0 ) { LM_ERR("failed to register TMCB for transaction %d:%d\n", t->hash_index, t->label); _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
