diff --git a/queue.c b/queue.c index 0e0e856..30e708d 100644 --- a/queue.c +++ b/queue.c @@ -83,10 +83,10 @@ static void shoveller(void *qv) { subscription_t *sub = NULL; check_for_work: - info("Checking for work\n"); + //info("Checking for work\n"); if (sexp_queue_emptyp(q->backlog_q)) { - info("Backlog empty\n"); + //info("Backlog empty\n"); goto wait_and_shovel; } @@ -95,7 +95,7 @@ static void shoveller(void *qv) { find_valid_waiter: if (q->waiter_q.count == 0) { - info("No waiters\n"); + //info("No waiters\n"); sexp_queue_pushback(q->backlog_q, body); DECREF(body, sexp_destructor); q->waiter_q = examined; @@ -104,9 +104,11 @@ static void shoveller(void *qv) { sub = dequeue(&q->waiter_q); + /* info("Delivering to <<%.*s>>/<<%.*s>>...\n", sexp_data(sub->sink).len, sexp_data(sub->sink).bytes, sexp_data(sub->name).len, sexp_data(sub->name).bytes); + */ if ((sub->uuid == NULL) /* It has been unsubscribed. */ || !send_to_waiter(sub, body)) { /* Destination no longer exists. */ @@ -115,17 +117,17 @@ static void shoveller(void *qv) { goto find_valid_waiter; } - info("Delivery successful\n"); + //info("Delivery successful\n"); DECREF(body, sexp_destructor); queue_append(&q->waiter_q, &examined); enqueue(&q->waiter_q, sub); goto check_for_work; wait_and_shovel: - info("Waiting for throck\n"); + //info("Waiting for throck\n"); q->shovel_awake = 0; suspend(); - info("Throck received!\n"); + //info("Throck received!\n"); goto check_for_work; } diff --git a/relay.c b/relay.c index 5c641bb..412b43f 100644 --- a/relay.c +++ b/relay.c @@ -59,8 +59,10 @@ static void relay_destructor(node_t *n) { static void relay_handle_message(node_t *n, sexp_t *m) { relay_extension_t *r = n->extension; + /* info("fd %d <-- ", r->fd); sexp_writeln(stderr_h, m); + */ BCHECK(!sexp_write(r->outh, m), "relay_handle_message sexp_write"); } @@ -113,8 +115,10 @@ static void relay_main(node_t *n) { if (inh->error_kind != 0) goto network_error; + /* info("fd %d --> ", r->fd); sexp_writeln(stderr_h, message); + */ if (!(sexp_pairp(message) && sexp_stringp(sexp_head(message)))) { send_error(r->outh, "ill-formed message", NULL);