Commit 94228f4d authored by Dafydd Harries's avatar Dafydd Harries
Browse files

test client: improve comments/debug messages

darcs-hash:20070202084356-c9803-d8e64974e5b3ef14199b7d5e2008811afef2f7e4.gz
parent 808f6d5c
......@@ -23,7 +23,7 @@ send_stun (NiceUDPSocket *udpsock, struct sockaddr_in sin, gchar *username)
{
gchar *dump;
dump = stun_message_dump (msg);
g_print ("%s\n", dump);
g_debug ("sending message:\n%s", dump);
g_free (dump);
}
......@@ -40,7 +40,7 @@ send_stun (NiceUDPSocket *udpsock, struct sockaddr_in sin, gchar *username)
{
gchar *dump;
dump = stun_message_dump (msg);
g_print ("%s\n", dump);
g_debug ("got response:\n%s", dump);
g_free (dump);
}
......@@ -56,6 +56,8 @@ handle_connection (guint sock)
NiceUDPSocket udpsock;
NiceCandidate *candidate;
// recieve and parse remote candidate
line = readline (sock);
if (line == NULL)
......@@ -69,6 +71,8 @@ handle_connection (guint sock)
g_debug ("got candidate: %s", line);
g_free (line);
// create local UDP port
nice_udp_bsd_socket_factory_init (&man);
sin.sin_family = AF_INET;
......@@ -88,7 +92,8 @@ handle_connection (guint sock)
g_free (line);
// copy remote candidate address into sin
// agent doesn't initiate connectivity checks, so make our own for now
sin.sin_addr.s_addr = htonl (candidate->addr.addr_ipv4);
sin.sin_port = htons (candidate->port);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment