summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2013-11-11 12:33:51 +0100
committerYorhel <git@yorhel.nl>2013-11-11 12:33:51 +0100
commit0414583a900c3348db855c6aabb6b367566349be (patch)
tree1f101d1b4cda8430241e80f53263147879f04138
parent5c98226d6127a086444e302b0d1a665cb5ffff55 (diff)
dlfile: Always set t->uid in dlfile_getchunk()
-rw-r--r--src/dlfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dlfile.c b/src/dlfile.c
index 21b3846..f5a10a6 100644
--- a/src/dlfile.c
+++ b/src/dlfile.c
@@ -474,7 +474,6 @@ dlfile_thread_t *dlfile_getchunk(dl_t *dl, guint64 uid, guint64 speed) {
t->chunk = chunk;
t->avail = tsec->avail - (chunk - tsec->chunk);
g_return_val_if_fail(t->avail > 0, NULL);
- t->uid = uid;
tth_init(&t->hash_tth);
tsec->avail -= t->avail;
@@ -491,6 +490,7 @@ dlfile_thread_t *dlfile_getchunk(dl_t *dl, guint64 uid, guint64 speed) {
} else
t->allocated = t->avail;
t->busy = TRUE;
+ t->uid = uid;
dl->active_threads++;
/* Go through the list again to update dl->allbusy */