summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@ktknet.cz>2015-09-11 11:33:51 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-09-11 11:33:51 +0100
commit84eaa12b0b1a76c45ce2d77294e0477c10552cd4 (patch)
tree3dc38508c3bce9b62fe72bbe3ba4ac02ccaf7d02
parent837c8953fe87bdd5d5bccc444e72739100578ef8 (diff)
downloadlibnice-84eaa12b0b1a76c45ce2d77294e0477c10552cd4.tar.gz
agent: check for base socket in _tcp_sock_is_writable()
The argument passed into the callback is always a base (TCP/UDP) socket, which can't be directly compared with local candidate's sockptr (may be TURN, http, or other socket wrapping another one). We're in fact interested whether sock is a base socket of sockptr. Maniphest Tasks: T114 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.freedesktop.org/D241
-rw-r--r--agent/agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/agent.c b/agent/agent.c
index 6b20ddf..0a99185 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -1851,7 +1851,7 @@ _tcp_sock_is_writable (NiceSocket *sock, gpointer user_data)
/* Don't signal writable if the socket that has become writable is not
* the selected pair */
if (component->selected_pair.local == NULL ||
- component->selected_pair.local->sockptr != sock) {
+ !nice_socket_is_base_of (sock, component->selected_pair.local->sockptr)) {
agent_unlock ();
return;
}