Browse Source

Reverse participant matching logic

The from-tag may have been added to the message automatically, so we
should first check if any other flags are present, and use it only if
nothing else was found

Change-Id: Iec95d56812c31185ecd1171d01c922e7af0f5dd4
changes/15/27915/1
Richard Fuchs 7 years ago
parent
commit
9eea6b1fc4
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      daemon/call_interfaces.c

+ 6
- 6
daemon/call_interfaces.c View File

@ -1487,12 +1487,7 @@ static const char *media_block_match(struct call **call, struct call_monologue *
return "Unknown call-id";
// directional block?
if (bencode_dictionary_get_str(input, "from-tag", &s)) {
*monologue = call_get_mono_dialogue(*call, &s, NULL, NULL);
if (!*monologue)
return "From-tag given, but no such tag exists";
}
else if (bencode_dictionary_get_str(input, "address", &s)) {
if (bencode_dictionary_get_str(input, "address", &s)) {
sockaddr_t addr;
if (sockaddr_parse_any_str(&addr, &s))
return "Failed to parse network address";
@ -1515,6 +1510,11 @@ static const char *media_block_match(struct call **call, struct call_monologue *
found:
;
}
else if (bencode_dictionary_get_str(input, "from-tag", &s)) {
*monologue = call_get_mono_dialogue(*call, &s, NULL, NULL);
if (!*monologue)
return "From-tag given, but no such tag exists";
}
return NULL;
}


Loading…
Cancel
Save