aboutsummaryrefslogtreecommitdiff
path: root/slirp/udp6.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-22 02:06:41 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 23:36:38 +0100
commit226ea7a96485f2b9db13b523551c536dc68a1689 (patch)
treec2e90a49e934d31ca6e22678888e63c07785f856 /slirp/udp6.c
parent2a2d3e4a258b9ed7ef5be7c6e421d58a365a0297 (diff)
slirp: call into g_debug() for DEBUG macros
Make slirp use GLib logging, instead of fprintf(), so that applications can filter log, process it etc. With recent versions of glib, G_MESSAGES_DEBUG must be set to "all" or "Slirp" to see slirp debug messages. Reformat DEBUG_MISC & DEBUG_ERROR calls to not need \n ending. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/udp6.c')
-rw-r--r--slirp/udp6.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/slirp/udp6.c b/slirp/udp6.c
index 8cdb1892e2..fa531e03c4 100644
--- a/slirp/udp6.c
+++ b/slirp/udp6.c
@@ -92,8 +92,7 @@ void udp6_input(struct mbuf *m)
/* If there's no socket for this packet, create one. */
so = socreate(slirp);
if (udp_attach(so, AF_INET6) == -1) {
- DEBUG_MISC(" udp6_attach errno = %d-%s\n",
- errno, strerror(errno));
+ DEBUG_MISC(" udp6_attach errno = %d-%s", errno, strerror(errno));
sofree(so);
goto bad;
}
@@ -119,7 +118,7 @@ void udp6_input(struct mbuf *m)
m->m_len += iphlen;
m->m_data -= iphlen;
*ip = save_ip;
- DEBUG_MISC("udp tx errno = %d-%s\n", errno, strerror(errno));
+ DEBUG_MISC("udp tx errno = %d-%s", errno, strerror(errno));
icmp6_send_error(m, ICMP6_UNREACH, ICMP6_UNREACH_NO_ROUTE);
goto bad;
}