[sr-dev] git:master:e279f2f4: topos: explicitely set the db match operator and value type for uuid

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


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

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

topos: explicitely set the db match operator and value type for uuid

---

Modified: src/modules/topos/tps_storage.c

---

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

---

diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index 2d611402c8..6e88b35af3 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -1148,20 +1148,32 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
 		if(md->a_uuid.len>0) {
 			if(md->a_uuid.s[0]=='a') {
 				db_keys[nr_keys]=&tt_col_a_uuid;
+				db_ops[nr_keys]=OP_EQ;
+				db_vals[nr_keys].type = DB1_STR;
+				db_vals[nr_keys].nul = 0;
 				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_ops[nr_keys]=OP_EQ;
+				db_vals[nr_keys].type = DB1_STR;
+				db_vals[nr_keys].nul = 0;
 				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_ops[nr_keys]=OP_EQ;
+				db_vals[nr_keys].type = DB1_STR;
+				db_vals[nr_keys].nul = 0;
 				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_ops[nr_keys]=OP_EQ;
+				db_vals[nr_keys].type = DB1_STR;
+				db_vals[nr_keys].nul = 0;
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
 				nr_keys++;
 			}




More information about the sr-dev mailing list