diff options
author | irungentoo <irungentoo@gmail.com> | 2015-03-09 14:32:37 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-03-09 14:32:37 -0400 |
commit | 4c4ffb74093037ab6cd02d310a07b73022becf83 (patch) | |
tree | 99dbee501c3c7522be19a7d1e6acab0d698f3e29 | |
parent | 73b9cf48f98e2d377d146ee0dfa5b6c65b69976c (diff) |
Fixed case where a recv and a sending file would have the same number.
recv file numbers are now (file num in packet + 1) << 16
-rw-r--r-- | toxcore/Messenger.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 9b5d75fc..251d00d2 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1765,6 +1765,7 @@ static int handle_packet(void *object, int i, uint8_t *temp, uint16_t len) | |||
1765 | filename_terminated[data_length - head_length] = 0; | 1765 | filename_terminated[data_length - head_length] = 0; |
1766 | 1766 | ||
1767 | uint32_t real_filenumber = filenumber; | 1767 | uint32_t real_filenumber = filenumber; |
1768 | real_filenumber += 1; | ||
1768 | real_filenumber <<= 16; | 1769 | real_filenumber <<= 16; |
1769 | 1770 | ||
1770 | if (m->file_sendrequest) | 1771 | if (m->file_sendrequest) |