summaryrefslogtreecommitdiffstats
path: root/src/server/uplink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/uplink.c')
-rw-r--r--src/server/uplink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/uplink.c b/src/server/uplink.c
index 13ae7ad..a4fccf9 100644
--- a/src/server/uplink.c
+++ b/src/server/uplink.c
@@ -138,13 +138,13 @@ int uplink_request(dnbd3_client_t *client, uint64_t handle, uint64_t start, uint
uplink->queue[freeSlot].to = end;
uplink->queue[freeSlot].handle = handle;
uplink->queue[freeSlot].client = client;
- uplink->queue[freeSlot].status = (foundExisting ? ULR_PENDING : ULR_NEW);
+ uplink->queue[freeSlot].status = (foundExisting == -1 ? ULR_NEW : ULR_PENDING);
#ifdef _DEBUG
uplink->queue[freeSlot].entered = time( NULL );
#endif
spin_unlock( &uplink->queueLock );
- if ( !foundExisting ) {
+ if ( foundExisting == -1 ) {
static uint64_t counter = 1;
write( uplink->signal, &counter, sizeof(uint64_t) );
}