From 7f24238ab5c658ea0d15d7e948056441bf6ba6e2 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 20 Jun 2009 22:46:11 +0200 Subject: [PATCH] Disable sendq debugging. --- src/hubio.c | 10 +++++++--- src/netevent.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hubio.c b/src/hubio.c index 46c6069..1074a42 100644 --- a/src/hubio.c +++ b/src/hubio.c @@ -152,6 +152,9 @@ int hub_sendq_send(struct hub_sendq* q, hub_recvq_write w, void* data) return bytes_sent; #else + +/* <======.....><.......><.......> */ + int ret = 0; size_t sent = 0; size_t bytes = 0; @@ -178,8 +181,9 @@ int hub_sendq_send(struct hub_sendq* q, hub_recvq_write w, void* data) } msg = list_get_first(q->queue); +#ifdef DEBUG_SENDQ printf("Queued up bytes: %d, in %d msgs (first=%d/%d)\n", (int) bytes, (int) msgs, (int) q->offset, (msg ? (int) msg->length : 0)); - +#endif /* Send as much as possible */ ret = w(data, sbuf, bytes); @@ -195,9 +199,9 @@ int hub_sendq_send(struct hub_sendq* q, hub_recvq_write w, void* data) if (sent >= bytes) break; - +#ifdef DEBUG_SENDQ printf("removing msg %d [%p]\n", (int) msgs, msg); - +#endif hub_sendq_remove(q, msg); msgs--; msg = list_get_next(q->queue); diff --git a/src/netevent.c b/src/netevent.c index e545248..66c9999 100644 --- a/src/netevent.c +++ b/src/netevent.c @@ -23,7 +23,7 @@ /* FIXME: This should not be needed! */ extern struct hub_info* g_hub; -#define DEBUG_SENDQ 1 +/* #define DEBUG_SENDQ 1 */ int net_user_send(void* ptr, const void* buf, size_t len) {