2
0
Эх сурвалжийг харах

dialog(k): use proper scan string for optional headers parameter in rpc commands

- credits to Kristofer Signer for report and troubleshooting
Daniel-Constantin Mierla 13 жил өмнө
parent
commit
d5120187eb

+ 2 - 2
modules_k/dialog/dialog.c

@@ -1587,7 +1587,7 @@ static void rpc_end_dlg_entry_id(rpc_t *rpc, void *c) {
 	dlg_cell_t * dlg = NULL;
 	dlg_cell_t * dlg = NULL;
 	str rpc_extra_hdrs = {NULL,0};
 	str rpc_extra_hdrs = {NULL,0};
 
 
-	if (rpc->scan(c, "ddS", &h_entry, &h_id, &rpc_extra_hdrs) < 2) return;
+	if (rpc->scan(c, "dd*S", &h_entry, &h_id, &rpc_extra_hdrs) < 2) return;
 
 
 	dlg = dlg_lookup(h_entry, h_id);
 	dlg = dlg_lookup(h_entry, h_id);
 	if(dlg){
 	if(dlg){
@@ -1624,7 +1624,7 @@ static void rpc_dlg_bridge(rpc_t *rpc, void *c) {
 	str to = {NULL,0};
 	str to = {NULL,0};
 	str op = {NULL,0};
 	str op = {NULL,0};
 
 
-	if (rpc->scan(c, "SSS", &from, &to, &op) < 2) return;
+	if (rpc->scan(c, "SS*S", &from, &to, &op) < 2) return;
 
 
 	dlg_bridge(&from, &to, &op);
 	dlg_bridge(&from, &to, &op);
 }
 }