diff options
author | irungentoo <irungentoo@gmail.com> | 2013-10-05 10:55:28 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-10-05 10:55:28 -0400 |
commit | b2c5e16132686f05c6726cd41e117656f3f1e636 (patch) | |
tree | 936866bd29766871fd379f8e584f6cafcb15368f | |
parent | b0f9e6db6fbeea9dc3bcf86613639d457e440300 (diff) |
Fixed file sending bug.
-rw-r--r-- | toxcore/Messenger.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 32243053..65e55bfb 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1044,8 +1044,13 @@ int file_control(Messenger *m, int friendnumber, uint8_t send_receive, uint8_t f | |||
1044 | if (friend_not_valid(m, friendnumber)) | 1044 | if (friend_not_valid(m, friendnumber)) |
1045 | return 0; | 1045 | return 0; |
1046 | 1046 | ||
1047 | if (m->friendlist[friendnumber].file_receiving[filenumber].status == FILESTATUS_NONE) | 1047 | if (send_receive == 1) { |
1048 | return 0; | 1048 | if (m->friendlist[friendnumber].file_receiving[filenumber].status == FILESTATUS_NONE) |
1049 | return 0; | ||
1050 | } else { | ||
1051 | if (m->friendlist[friendnumber].file_sending[filenumber].status == FILESTATUS_NONE) | ||
1052 | return 0; | ||
1053 | } | ||
1049 | 1054 | ||
1050 | if (send_receive > 1) | 1055 | if (send_receive > 1) |
1051 | return 0; | 1056 | return 0; |