[sr-dev] git:master:fb5ab201: topos: increase the number of db keys for query when using uuid for branch

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 26 14:52:39 CEST 2021


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-04-26T14:51:55+02:00

topos: increase the number of db keys for query when using uuid for branch

- debug message to print a/b uuid

---

Modified: src/modules/topos/tps_msg.c
Modified: src/modules/topos/tps_storage.c

---

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

---

diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index 852a19aaa2..854d2cdbc6 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -826,6 +826,9 @@ int tps_request_received(sip_msg_t *msg, int dialog)
 	}
 
 	lkey = msg->callid->body;
+	LM_DBG("callid [%.*s] - a_uuid [%.*s] - b_uuid [%.*s]\n", lkey.len, lkey.s,
+			mtsd.a_uuid.len, ((mtsd.a_uuid.len>0)?mtsd.a_uuid.s:""),
+			mtsd.b_uuid.len, ((mtsd.b_uuid.len>0)?mtsd.b_uuid.s:""));
 
 	tps_storage_lock_get(&lkey);
 
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index caff16c5ee..2d611402c8 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -1149,17 +1149,21 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
 			if(md->a_uuid.s[0]=='a') {
 				db_keys[nr_keys]=&tt_col_a_uuid;
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
+				nr_keys++;
 			} else if(md->a_uuid.s[0]=='b') {
 				db_keys[nr_keys]=&tt_col_b_uuid;
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
+				nr_keys++;
 			}
 		} else if(md->b_uuid.len>0) {
 			if(md->b_uuid.s[0]=='a') {
 				db_keys[nr_keys]=&tt_col_a_uuid;
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
+				nr_keys++;
 			} else if(md->b_uuid.s[0]=='b') {
 				db_keys[nr_keys]=&tt_col_b_uuid;
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
+				nr_keys++;
 			}
 		}
 	}




More information about the sr-dev mailing list