Browse code

rtpengine: add `flags` field for every command

Richard Fuchs authored on 14/04/2020 17:15:21
Showing 1 changed files
... ...
@@ -2401,8 +2401,9 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
2401 2401
 	bencode_list_add_string(item, "load limit");
2402 2402
 
2403 2403
 	body.s = NULL;
2404
+	ng_flags.flags = bencode_list(bencbuf);
2405
+
2404 2406
 	if (op == OP_OFFER || op == OP_ANSWER) {
2405
-		ng_flags.flags = bencode_list(bencbuf);
2406 2407
 		ng_flags.direction = bencode_list(bencbuf);
2407 2408
 		ng_flags.replace = bencode_list(bencbuf);
2408 2409
 		ng_flags.rtcp_mux = bencode_list(bencbuf);
... ...
@@ -2428,11 +2429,6 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
2428 2429
 		else
2429 2430
 			bencode_dictionary_add_str(ng_flags.dict, "sdp", &body);
2430 2431
 	}
2431
-	else if (op == OP_BLOCK_DTMF || op == OP_BLOCK_MEDIA || op == OP_UNBLOCK_DTMF
2432
-			|| op == OP_UNBLOCK_MEDIA || op == OP_START_FORWARDING || op == OP_STOP_FORWARDING)
2433
-	{
2434
-		ng_flags.flags = bencode_list(bencbuf);
2435
-	}
2436 2432
 
2437 2433
 	/*** parse flags & build dictionary ***/
2438 2434