aboutsummaryrefslogtreecommitdiff
path: root/slirp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/socket.c')
-rw-r--r--slirp/socket.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index 08a065f6a7..5ffbaa064a 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -208,7 +208,8 @@ soread(struct socket *so)
}
}
- DEBUG_MISC(" --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno));
+ DEBUG_MISC(" --- soread() disconnected, nn = %d, errno = %d-%s",
+ nn, errno,strerror(errno));
sofcantrcvmore(so);
if (err == ECONNRESET || err == ECONNREFUSED
@@ -237,7 +238,7 @@ soread(struct socket *so)
nn += ret;
}
- DEBUG_MISC(" ... read nn = %d bytes\n", nn);
+ DEBUG_MISC(" ... read nn = %d bytes", nn);
/* Update fields */
sb->sb_cc += nn;
@@ -370,7 +371,7 @@ sosendoob(struct socket *so)
n = slirp_send(so, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */
#ifdef DEBUG
if (n != len) {
- DEBUG_ERROR("Didn't send all data urgently XXXXX\n");
+ DEBUG_ERROR("Didn't send all data urgently XXXXX");
}
#endif
}
@@ -379,7 +380,7 @@ sosendoob(struct socket *so)
return n;
}
so->so_urgc -= n;
- DEBUG_MISC(" ---2 sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc);
+ DEBUG_MISC(" ---2 sent %d bytes urgent data, %d urgent bytes left", n, so->so_urgc);
sb->sb_cc -= n;
sb->sb_rptr += n;
@@ -460,7 +461,7 @@ sowrite(struct socket *so)
if (ret > 0)
nn += ret;
}
- DEBUG_MISC(" ... wrote nn = %d bytes\n", nn);
+ DEBUG_MISC(" ... wrote nn = %d bytes", nn);
/* Update sbuf */
sb->sb_cc -= nn;
@@ -478,7 +479,7 @@ sowrite(struct socket *so)
return nn;
err_disconnected:
- DEBUG_MISC(" --- sowrite disconnected, so->so_state = %x, errno = %d\n",
+ DEBUG_MISC(" --- sowrite disconnected, so->so_state = %x, errno = %d",
so->so_state, errno);
sofcantsendmore(so);
tcp_sockclosed(sototcpcb(so));
@@ -512,7 +513,7 @@ sorecvfrom(struct socket *so)
if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST;
else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET;
- DEBUG_MISC(" udp icmp rx errno = %d-%s\n",
+ DEBUG_MISC(" udp icmp rx errno = %d-%s",
errno,strerror(errno));
icmp_send_error(so->so_m, ICMP_UNREACH, code, 0, strerror(errno));
} else {
@@ -564,7 +565,7 @@ sorecvfrom(struct socket *so)
m->m_len = recvfrom(so->s, m->m_data, len, 0,
(struct sockaddr *)&addr, &addrlen);
- DEBUG_MISC(" did recvfrom %d, errno = %d-%s\n",
+ DEBUG_MISC(" did recvfrom %d, errno = %d-%s",
m->m_len, errno,strerror(errno));
if(m->m_len<0) {
/* Report error as ICMP */
@@ -579,7 +580,7 @@ sorecvfrom(struct socket *so)
code = ICMP_UNREACH_NET;
}
- DEBUG_MISC(" rx error, tx icmp ICMP_UNREACH:%i\n", code);
+ DEBUG_MISC(" rx error, tx icmp ICMP_UNREACH:%i", code);
icmp_send_error(so->so_m, ICMP_UNREACH, code, 0, strerror(errno));
break;
case AF_INET6:
@@ -591,7 +592,7 @@ sorecvfrom(struct socket *so)
code = ICMP6_UNREACH_NO_ROUTE;
}
- DEBUG_MISC(" rx error, tx icmp6 ICMP_UNREACH:%i\n", code);
+ DEBUG_MISC(" rx error, tx icmp6 ICMP_UNREACH:%i", code);
icmp6_send_error(so->so_m, ICMP6_UNREACH, code);
break;
default:
@@ -839,8 +840,7 @@ void sotranslate_out(struct socket *so, struct sockaddr_storage *addr)
}
}
- DEBUG_MISC(" addr.sin_port=%d, "
- "addr.sin_addr.s_addr=%.16s\n",
+ DEBUG_MISC(" addr.sin_port=%d, addr.sin_addr.s_addr=%.16s",
ntohs(sin->sin_port), inet_ntoa(sin->sin_addr));
break;