Browse code

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

(cherry picked from commit e279f2f464ab05e1a2821d6e2d9e673fe145fbf2)

Daniel-Constantin Mierla authored on 26/04/2021 12:58:39
Showing 1 changed files
... ...
@@ -1148,20 +1148,32 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
1148 1148
 		if(md->a_uuid.len>0) {
1149 1149
 			if(md->a_uuid.s[0]=='a') {
1150 1150
 				db_keys[nr_keys]=&tt_col_a_uuid;
1151
+				db_ops[nr_keys]=OP_EQ;
1152
+				db_vals[nr_keys].type = DB1_STR;
1153
+				db_vals[nr_keys].nul = 0;
1151 1154
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
1152 1155
 				nr_keys++;
1153 1156
 			} else if(md->a_uuid.s[0]=='b') {
1154 1157
 				db_keys[nr_keys]=&tt_col_b_uuid;
1158
+				db_ops[nr_keys]=OP_EQ;
1159
+				db_vals[nr_keys].type = DB1_STR;
1160
+				db_vals[nr_keys].nul = 0;
1155 1161
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
1156 1162
 				nr_keys++;
1157 1163
 			}
1158 1164
 		} else if(md->b_uuid.len>0) {
1159 1165
 			if(md->b_uuid.s[0]=='a') {
1160 1166
 				db_keys[nr_keys]=&tt_col_a_uuid;
1167
+				db_ops[nr_keys]=OP_EQ;
1168
+				db_vals[nr_keys].type = DB1_STR;
1169
+				db_vals[nr_keys].nul = 0;
1161 1170
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
1162 1171
 				nr_keys++;
1163 1172
 			} else if(md->b_uuid.s[0]=='b') {
1164 1173
 				db_keys[nr_keys]=&tt_col_b_uuid;
1174
+				db_ops[nr_keys]=OP_EQ;
1175
+				db_vals[nr_keys].type = DB1_STR;
1176
+				db_vals[nr_keys].nul = 0;
1165 1177
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
1166 1178
 				nr_keys++;
1167 1179
 			}