Module: kamailio
Branch: master
Commit: e7dc20f48c674b0eca5419c93e05a430a5b20e71
URL:
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a43…
Author: grumvalski <federico.cabiddu(a)gmail.com>
Committer: grumvalski <federico.cabiddu(a)gmail.com>
Date: 2015-03-29T17:48:20+02:00
modules/tsilo: return from ts_store if transaction is not defined
---
Modified: modules/tsilo/ts_hash.c
Modified: modules/tsilo/ts_store.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a43…
Patch:
https://github.com/kamailio/kamailio/commit/e7dc20f48c674b0eca5419c93e05a43…
---
diff --git a/modules/tsilo/ts_hash.c b/modules/tsilo/ts_hash.c
index 6225db6..cf529ee 100644
--- a/modules/tsilo/ts_hash.c
+++ b/modules/tsilo/ts_hash.c
@@ -297,7 +297,7 @@ void remove_ts_urecord(ts_urecord_t* _r)
int insert_ts_transaction(struct cell* t, struct sip_msg* msg, struct ts_urecord* _r)
{
ts_transaction_t *ptr, *prev;
- ts_transaction_t* ts;
+ ts_transaction_t* ts;
unsigned int tindex;
unsigned int tlabel;
diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index 76ab9f6..48d1441 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -46,6 +46,11 @@ int ts_store(struct sip_msg* msg) {
t = _tmb.t_gett();
ruri = msg->first_line.u.request.uri;
+ if (!t || t==T_UNDEFINED) {
+ LM_ERR("no transaction defined for %.*s\n", ruri.len, ruri.s);
+ return -1;
+ }
+
LM_DBG("storing transaction %u:%u for r-uri: %.*s\n", t->hash_index,
t->label, ruri.len, ruri.s);
lock_entry_by_ruri(&ruri);