summaryrefslogtreecommitdiff
path: root/socket
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2016-03-01 22:28:35 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2016-03-01 22:28:48 +0000
commit80973c096de872983bc60cd28a84653931f8d601 (patch)
tree23f349681560412343d44c089ebdc2de3aa2c2f8 /socket
parent41ab61def82aa275649afd5f4a3fcb43e75fb360 (diff)
downloadlibnice-80973c096de872983bc60cd28a84653931f8d601.tar.gz
conncheck: add more debug information
Add a more debug details, specifically in some places, it is interesting to have the src and dst IP addresses of the pairs being checked, and also to make the difference between log related to different stream ids. Reviewed-by: Philip Withnall <philip@tecnocode.co.uk> Differential Revision: https://phabricator.freedesktop.org/D803
Diffstat (limited to 'socket')
-rw-r--r--socket/udp-turn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/socket/udp-turn.c b/socket/udp-turn.c
index 2e6618e..e6e7f89 100644
--- a/socket/udp-turn.c
+++ b/socket/udp-turn.c
@@ -1368,12 +1368,17 @@ nice_udp_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
} peer;
socklen_t peer_len = sizeof(peer);
NiceAddress to;
+ gchar tmpbuf[INET6_ADDRSTRLEN];
- nice_debug ("got response for CreatePermission");
stun_message_find_xor_addr (
&current_create_permission_msg->message,
STUN_ATTRIBUTE_XOR_PEER_ADDRESS, &peer.storage, &peer_len);
nice_address_set_from_sockaddr (&to, &peer.addr);
+ nice_address_to_string (&to, tmpbuf);
+ nice_debug ("TURN: got response for CreatePermission "
+ "with XOR_PEER_ADDRESS=[%s]:%u : %s",
+ tmpbuf, nice_address_get_port (&to),
+ stun_message_get_class (&msg) == STUN_ERROR ? "unauthorized" : "ok");
/* unathorized => resend with realm and nonce */
if (stun_message_get_class (&msg) == STUN_ERROR) {