summaryrefslogtreecommitdiffstats
path: root/src/server/uplink.c
diff options
context:
space:
mode:
authorSimon Rettberg2019-08-27 20:58:01 +0200
committerSimon Rettberg2019-08-27 20:58:01 +0200
commitb848c60317dcb5193e4541a679dfc82a257f83e9 (patch)
tree5a6a6bc1b40acd502a35512f9780bb59d3dfb5c6 /src/server/uplink.c
parent[SERVER] Use reference counting for uplink (diff)
downloaddnbd3-b848c60317dcb5193e4541a679dfc82a257f83e9.tar.gz
dnbd3-b848c60317dcb5193e4541a679dfc82a257f83e9.tar.xz
dnbd3-b848c60317dcb5193e4541a679dfc82a257f83e9.zip
[SERVER] Fix swapped assignment
Diffstat (limited to 'src/server/uplink.c')
-rw-r--r--src/server/uplink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/uplink.c b/src/server/uplink.c
index 7a39887..d77be9c 100644
--- a/src/server/uplink.c
+++ b/src/server/uplink.c
@@ -960,7 +960,7 @@ static void uplink_handleReceive(dnbd3_uplink_t *uplink)
mutex_unlock( &client->sendMutex );
mutex_lock( &uplink->queueLock );
if ( i > uplink->queueLen ) {
- uplink->queueLen = i; // Might have been set to 0 by cancelAllRequests
+ i = uplink->queueLen; // Might have been set to 0 by cancelAllRequests
}
}
if ( req->status == ULR_FREE && i == uplink->queueLen - 1 ) uplink->queueLen--;