Browse code

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

- debug message to print a/b uuid

(cherry picked from commit fb5ab20123a07afdfaf96197db25d76f8dda0683)

Daniel-Constantin Mierla authored on 26/04/2021 12:51:55
Showing 2 changed files
... ...
@@ -826,6 +826,9 @@ int tps_request_received(sip_msg_t *msg, int dialog)
826 826
 	}
827 827
 
828 828
 	lkey = msg->callid->body;
829
+	LM_DBG("callid [%.*s] - a_uuid [%.*s] - b_uuid [%.*s]\n", lkey.len, lkey.s,
830
+			mtsd.a_uuid.len, ((mtsd.a_uuid.len>0)?mtsd.a_uuid.s:""),
831
+			mtsd.b_uuid.len, ((mtsd.b_uuid.len>0)?mtsd.b_uuid.s:""));
829 832
 
830 833
 	tps_storage_lock_get(&lkey);
831 834
 
... ...
@@ -1149,17 +1149,21 @@ int tps_db_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
1149 1149
 			if(md->a_uuid.s[0]=='a') {
1150 1150
 				db_keys[nr_keys]=&tt_col_a_uuid;
1151 1151
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
1152
+				nr_keys++;
1152 1153
 			} else if(md->a_uuid.s[0]=='b') {
1153 1154
 				db_keys[nr_keys]=&tt_col_b_uuid;
1154 1155
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->a_uuid);
1156
+				nr_keys++;
1155 1157
 			}
1156 1158
 		} else if(md->b_uuid.len>0) {
1157 1159
 			if(md->b_uuid.s[0]=='a') {
1158 1160
 				db_keys[nr_keys]=&tt_col_a_uuid;
1159 1161
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
1162
+				nr_keys++;
1160 1163
 			} else if(md->b_uuid.s[0]=='b') {
1161 1164
 				db_keys[nr_keys]=&tt_col_b_uuid;
1162 1165
 				db_vals[nr_keys].val.str_val = TPS_STRZ(md->b_uuid);
1166
+				nr_keys++;
1163 1167
 			}
1164 1168
 		}
1165 1169
 	}