[sr-dev] git:master:5d661eaa: topos: use context to load stored branch attributes only for requests

Daniel-Constantin Mierla miconda at gmail.com
Fri Apr 23 12:36:45 CEST 2021


Module: kamailio
Branch: master
Commit: 5d661eaa92461f3b43c433ec32653c4f89bb818e
URL: https://github.com/kamailio/kamailio/commit/5d661eaa92461f3b43c433ec32653c4f89bb818e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-04-23T12:36:20+02:00

topos: use context to load stored branch attributes only for requests

---

Modified: src/modules/topos/tps_storage.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5d661eaa92461f3b43c433ec32653c4f89bb818e.diff
Patch: https://github.com/kamailio/kamailio/commit/5d661eaa92461f3b43c433ec32653c4f89bb818e.patch

---

diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index 408d84d8cc..25275ab272 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -1146,7 +1146,7 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
 		nr_keys++;
 	}
 
-	if(md->x_context.len>0) {
+	if(msg->first_line.type==SIP_REQUEST && md->x_context.len>0) {
 		db_keys[nr_keys]=&tt_col_x_context;
 		db_ops[nr_keys]=OP_EQ;
 		db_vals[nr_keys].type = DB1_STR;




More information about the sr-dev mailing list