summaryrefslogtreecommitdiffstats
path: root/src/server/uplink.c
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-23 14:18:07 +0100
committerSimon Rettberg2015-02-23 14:18:07 +0100
commitee10e4887bb6651f7e59c32f8be09325b08e3533 (patch)
treea169f39206b2e2e5db0d2de23ef4c6fe14e1489f /src/server/uplink.c
parent[SERVER] Overhauled logging (diff)
downloaddnbd3-ee10e4887bb6651f7e59c32f8be09325b08e3533.tar.gz
dnbd3-ee10e4887bb6651f7e59c32f8be09325b08e3533.tar.xz
dnbd3-ee10e4887bb6651f7e59c32f8be09325b08e3533.zip
[SERVER] printf -> logadd, make USR2 trigger a log cycle, remove old fake delay feature
Diffstat (limited to 'src/server/uplink.c')
-rw-r--r--src/server/uplink.c6
1 files changed, 3 insertions, 3 deletions
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 );
}
}