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) {