mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'file-transfers' of https://github.com/irungentoo/ProjectTox-Core into file-transfers
This commit is contained in:
commit
8a77211b43
|
@ -971,10 +971,10 @@ void callback_file_data(Messenger *m, void (*function)(Messenger *m, int, uint8_
|
|||
m->file_filedata_userdata = userdata;
|
||||
}
|
||||
|
||||
#define MAX_FILENAME_LENGTH 256
|
||||
#define MAX_FILENAME_LENGTH 255
|
||||
|
||||
/* Send a file send request.
|
||||
* Maximum filename length is 256 bytes.
|
||||
* Maximum filename length is 255 bytes.
|
||||
* return 1 on success
|
||||
* return 0 on failure
|
||||
*/
|
||||
|
@ -998,7 +998,7 @@ int file_sendrequest(Messenger *m, int friendnumber, uint8_t filenumber, uint64_
|
|||
}
|
||||
|
||||
/* Send a file send request.
|
||||
* Maximum filename length is 256 bytes.
|
||||
* Maximum filename length is 255 bytes.
|
||||
* return file number on success
|
||||
* return -1 on failure
|
||||
*/
|
||||
|
@ -1518,7 +1518,7 @@ void doFriends(Messenger *m)
|
|||
//filesize = ntohll(filesize);
|
||||
m->friendlist[i].file_receiving[filenumber].status = 1;
|
||||
m->friendlist[i].file_receiving[filenumber].size = filesize;
|
||||
|
||||
m->friendlist[i].file_receiving[filenumber].transferred = 0;
|
||||
if (m->file_sendrequest)
|
||||
(*m->file_sendrequest)(m, i, filenumber, filesize, data + 1 + sizeof(uint64_t), data_length - 1 - sizeof(uint64_t),
|
||||
m->file_sendrequest_userdata);
|
||||
|
|
|
@ -496,7 +496,7 @@ void callback_file_data(Messenger *m, void (*function)(Messenger *m, int, uint8_
|
|||
void *userdata);
|
||||
|
||||
/* Send a file send request.
|
||||
* Maximum filename length is 256 bytes.
|
||||
* Maximum filename length is 255 bytes.
|
||||
* return 1 on success
|
||||
* return 0 on failure
|
||||
*/
|
||||
|
@ -504,7 +504,7 @@ int file_sendrequest(Messenger *m, int friendnumber, uint8_t filenumber, uint64_
|
|||
uint16_t filename_length);
|
||||
|
||||
/* Send a file send request.
|
||||
* Maximum filename length is 256 bytes.
|
||||
* Maximum filename length is 255 bytes.
|
||||
* return file number on success
|
||||
* return -1 on failure
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user