Browse Source

misinterpreted the meaning of the "trust address" flag

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent
commit
1c830108ad
2 changed files with 5 additions and 17 deletions
  1. +1
    -1
      daemon/call.c
  2. +4
    -16
      daemon/sdp.c

+ 1
- 1
daemon/call.c View File

@ -2203,7 +2203,7 @@ static void call_ng_process_flags(struct sdp_ng_flags *out, GQueue *streams, ben
if ((list = bencode_dictionary_get_expect(input, "flags", BENCODE_LIST))) { if ((list = bencode_dictionary_get_expect(input, "flags", BENCODE_LIST))) {
for (it = list->child; it; it = it->sibling) { for (it = list->child; it; it = it->sibling) {
if (!bencode_strcmp(it, "trust-address")) if (!bencode_strcmp(it, "trust-address"))
out->trust_address = 1;
out->trust_address = 1; /* XXX support this somehow */
else if (!bencode_strcmp(it, "symmetric")) else if (!bencode_strcmp(it, "symmetric"))
out->symmetric = 1; out->symmetric = 1;
else if (!bencode_strcmp(it, "asymmetric")) else if (!bencode_strcmp(it, "asymmetric"))


+ 4
- 16
daemon/sdp.c View File

@ -737,13 +737,8 @@ static int insert_ice_address(struct sdp_chopper *chop, struct sdp_ng_flags *fla
char buf[64]; char buf[64];
int len; int len;
if (!flags->trust_address && flags->received_from_family.len == 3 && flags->received_from_address.len)
chopper_append_str(chop, &flags->received_from_address);
else {
call_stream_address(buf, sr->up, SAF_ICE, &len);
chopper_append_dup(chop, buf, len);
}
call_stream_address(buf, sr->up, SAF_ICE, &len);
chopper_append_dup(chop, buf, len);
chopper_append_printf(chop, " %hu", sr->fd.localport); chopper_append_printf(chop, " %hu", sr->fd.localport);
return 0; return 0;
@ -758,15 +753,8 @@ static int replace_network_address(struct sdp_chopper *chop, struct network_addr
if (copy_up_to(chop, &address->address_type)) if (copy_up_to(chop, &address->address_type))
return -1; return -1;
if (!flags->trust_address && flags->received_from_family.len == 3 && flags->received_from_address.len) {
chopper_append_str(chop, &flags->received_from_family);
chopper_append_c(chop, " ");
chopper_append_str(chop, &flags->received_from_address);
}
else {
call_stream_address(buf, sr->up, SAF_NG, &len);
chopper_append_dup(chop, buf, len);
}
call_stream_address(buf, sr->up, SAF_NG, &len);
chopper_append_dup(chop, buf, len);
if (skip_over(chop, &address->address)) if (skip_over(chop, &address->address))
return -1; return -1;


Loading…
Cancel
Save