aboutsummaryrefslogtreecommitdiff
path: root/slirp/tcp_input.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-14 16:36:31 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:43:30 +0100
commit2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f (patch)
tree82ef676d69fd01861496a6efaaab8b86706c3337 /slirp/tcp_input.c
parent90dfa2784164d1210ba95de462ce0f3b1030a698 (diff)
slirp: improve a bit the debug macros
Let them accept multiple arguments. Simplify the inner argument handling of DEBUG_ARGS/DEBUG_MISC_DEBUG_ERROR. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/tcp_input.c')
-rw-r--r--slirp/tcp_input.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 6af63469da..39821e5a34 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -236,8 +236,8 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso, unsigned short af)
Slirp *slirp;
DEBUG_CALL("tcp_input");
- DEBUG_ARGS((dfd, " m = %p iphlen = %2d inso = %p\n",
- m, iphlen, inso));
+ DEBUG_ARGS(" m = %p iphlen = %2d inso = %p\n",
+ m, iphlen, inso);
/*
* If called with m == 0, then we're continuing the connect
@@ -662,8 +662,8 @@ findso:
(errno != EINPROGRESS) && (errno != EWOULDBLOCK)
) {
uint8_t code;
- DEBUG_MISC((dfd, " tcp fconnect errno = %d-%s\n",
- errno,strerror(errno)));
+ DEBUG_MISC(" tcp fconnect errno = %d-%s\n",
+ errno,strerror(errno));
if(errno == ECONNREFUSED) {
/* ACK the SYN, send RST to refuse the connection */
tcp_respond(tp, ti, m, ti->ti_seq + 1, (tcp_seq) 0,
@@ -1032,8 +1032,7 @@ trimthenstep6:
if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) {
if (ti->ti_len == 0 && tiwin == tp->snd_wnd) {
- DEBUG_MISC((dfd, " dup ack m = %p so = %p\n",
- m, so));
+ DEBUG_MISC(" dup ack m = %p so = %p\n", m, so);
/*
* If we have outstanding data (other than
* a window probe), this is a completely
@@ -1411,7 +1410,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti)
int opt, optlen;
DEBUG_CALL("tcp_dooptions");
- DEBUG_ARGS((dfd, " tp = %p cnt=%i\n", tp, cnt));
+ DEBUG_ARGS(" tp = %p cnt=%i\n", tp, cnt);
for (; cnt > 0; cnt -= optlen, cp += optlen) {
opt = cp[0];
@@ -1611,7 +1610,7 @@ tcp_mss(struct tcpcb *tp, u_int offer)
(mss - (TCP_RCVSPACE % mss)) :
0));
- DEBUG_MISC((dfd, " returning mss = %d\n", mss));
+ DEBUG_MISC(" returning mss = %d\n", mss);
return mss;
}