diff options
-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; |