Commit 7ad14b88 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

tests: Improve debug output of pseudotcp tests slightly

parent 6d11a107
...@@ -188,8 +188,8 @@ readable (PseudoTcpSocket *sock, gpointer data) ...@@ -188,8 +188,8 @@ readable (PseudoTcpSocket *sock, gpointer data)
if (len == -1 && if (len == -1 &&
pseudo_tcp_socket_get_error (sock) != EWOULDBLOCK) { pseudo_tcp_socket_get_error (sock) != EWOULDBLOCK) {
g_printerr ("Error reading from socket: error code %d.\n", g_printerr ("Error reading from socket %p: %s.\n",
pseudo_tcp_socket_get_error (sock)); sock, g_strerror (pseudo_tcp_socket_get_error (sock)));
retval = -1; retval = -1;
g_main_loop_quit (main_loop); g_main_loop_quit (main_loop);
...@@ -210,7 +210,7 @@ closed (PseudoTcpSocket *sock, guint32 err, gpointer data) ...@@ -210,7 +210,7 @@ closed (PseudoTcpSocket *sock, guint32 err, gpointer data)
{ {
/* Don’t treat this as an error, since we’re throwing rubbish into the /* Don’t treat this as an error, since we’re throwing rubbish into the
* socket and can hardly expect it to complete successfully. */ * socket and can hardly expect it to complete successfully. */
g_debug ("Socket %p Closed : %d", sock, err); g_debug ("Socket %p Closed: %s", sock, g_strerror (err));
retval = 0; retval = 0;
g_main_loop_quit (main_loop); g_main_loop_quit (main_loop);
} }
......
...@@ -143,8 +143,8 @@ static void readable (PseudoTcpSocket *sock, gpointer data) ...@@ -143,8 +143,8 @@ static void readable (PseudoTcpSocket *sock, gpointer data)
if (len == -1 && if (len == -1 &&
pseudo_tcp_socket_get_error (sock) != EWOULDBLOCK) { pseudo_tcp_socket_get_error (sock) != EWOULDBLOCK) {
g_debug ("Error reading from socket : %d", g_debug ("Error reading from socket %p: %s", sock,
pseudo_tcp_socket_get_error (sock)); g_strerror (pseudo_tcp_socket_get_error (sock)));
exit (-1); exit (-1);
} }
} }
...@@ -225,7 +225,7 @@ static void adjust_clock (PseudoTcpSocket *sock) ...@@ -225,7 +225,7 @@ static void adjust_clock (PseudoTcpSocket *sock)
if (pseudo_tcp_socket_get_next_clock (sock, &timeout)) { if (pseudo_tcp_socket_get_next_clock (sock, &timeout)) {
timeout -= g_get_monotonic_time () / 1000; timeout -= g_get_monotonic_time () / 1000;
g_debug ("Socket %p: Adjuting clock to %ld ms", sock, timeout); g_debug ("Socket %p: Adjusting clock to %" G_GUINT64_FORMAT " ms", sock, timeout);
if (sock == left) { if (sock == left) {
if (left_clock != 0) if (left_clock != 0)
g_source_remove (left_clock); g_source_remove (left_clock);
......
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