@rfuchs requested changes on this pull request.


In src/modules/rtpengine/rtpengine.c:

> @@ -2529,6 +2551,7 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
 
 	body.s = NULL;
 	ng_flags.flags = bencode_list(bencbuf);
+	ng_flags.received-from = bencode_list(bencbuf);

Typo here (dash instead of underscore). Maybe at least try to compile it before submitting?


In src/modules/rtpengine/rtpengine.c:

> @@ -2649,13 +2672,18 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
 		bencode_dictionary_add_str(ng_flags.dict, "via-branch", &viabranch);
 	}
 
-	item = bencode_list(bencbuf);
-	bencode_dictionary_add(ng_flags.dict, "received-from", item);
-	bencode_list_add_string(item, (msg->rcv.src_ip.af == AF_INET) ? "IP4" : (
-		(msg->rcv.src_ip.af == AF_INET6) ? "IP6" :
-		"?"
-	) );
-	bencode_list_add_string(item, ip_addr2a(&msg->rcv.src_ip));
+	if (ng_flags.received_from && ng_flags.received_from->child) {
+		bencode_dictionary_add(ng_flags.dict, "received-from", ng_flags.received_from);
+	}
+	else {
+		item = bencode_list(bencbuf);

Just a suggestion, but you could reuse ng_flags.received_from here instead of creating a new list item. But up to you.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3230/review/1099086127@github.com>