From ee10e4887bb6651f7e59c32f8be09325b08e3533 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 23 Feb 2015 14:18:07 +0100 Subject: [SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake delay feature --- src/server/uplink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/uplink.c') diff --git a/src/server/uplink.c b/src/server/uplink.c index edf8b89..d71daa6 100644 --- a/src/server/uplink.c +++ b/src/server/uplink.c @@ -190,8 +190,8 @@ bool uplink_request(dnbd3_client_t *client, uint64_t handle, uint64_t start, uin if ( foundExisting != -1 && existingType != ULR_NEW && freeSlot > foundExisting ) foundExisting = -1; #ifdef _DEBUG if ( foundExisting != -1 ) { - printf( "%p (%s) Found existing request of type %s at slot %d, attaching in slot %d.\n", (void*)uplink, uplink->image->lower_name, existingType == ULR_NEW ? "ULR_NEW" : "ULR_PENDING", foundExisting, freeSlot ); - printf( "Original %" PRIu64 "-%" PRIu64 " (%p)\n" + logadd( LOG_DEBUG2, "%p (%s) Found existing request of type %s at slot %d, attaching in slot %d.\n", (void*)uplink, uplink->image->lower_name, existingType == ULR_NEW ? "ULR_NEW" : "ULR_PENDING", foundExisting, freeSlot ); + logadd( LOG_DEBUG2, "Original %" PRIu64 "-%" PRIu64 " (%p)\n" "New %" PRIu64 "-%" PRIu64 " (%p)\n", uplink->queue[foundExisting].from, uplink->queue[foundExisting].to, (void*)uplink->queue[foundExisting].client, start, end, (void*)client ); @@ -391,7 +391,7 @@ static void* uplink_mainloop(void *data) link->queue[i].status = ULR_NEW; resend = true; spin_unlock( &link->queueLock ); - printf("%s", buffer); + logadd( LOG_WARNING, "%s", buffer ); spin_lock( &link->queueLock ); } } -- cgit v1.2.3-55-g7522