diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 3488fcca..def05449 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1449,7 +1449,8 @@ int file_data(const Messenger *m, int32_t friendnumber, uint32_t filenumber, uin | |||
1449 | return -7; | 1449 | return -7; |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | /* Prevent file sending from filling up the entire buffer preventing messages from being sent. TODO: remove */ | 1452 | /* Prevent file sending from filling up the entire buffer preventing messages from being sent. |
1453 | * TODO(irungentoo): remove */ | ||
1453 | if (crypto_num_free_sendqueue_slots(m->net_crypto, friend_connection_crypt_connection_id(m->fr_c, | 1454 | if (crypto_num_free_sendqueue_slots(m->net_crypto, friend_connection_crypt_connection_id(m->fr_c, |
1454 | m->friendlist[friendnumber].friendcon_id)) < MIN_SLOTS_FREE) { | 1455 | m->friendlist[friendnumber].friendcon_id)) < MIN_SLOTS_FREE) { |
1455 | return -6; | 1456 | return -6; |
@@ -1458,7 +1459,7 @@ int file_data(const Messenger *m, int32_t friendnumber, uint32_t filenumber, uin | |||
1458 | int64_t ret = send_file_data_packet(m, friendnumber, filenumber, data, length); | 1459 | int64_t ret = send_file_data_packet(m, friendnumber, filenumber, data, length); |
1459 | 1460 | ||
1460 | if (ret != -1) { | 1461 | if (ret != -1) { |
1461 | //TODO record packet ids to check if other received complete file. | 1462 | // TODO(irungentoo): record packet ids to check if other received complete file. |
1462 | ft->transferred += length; | 1463 | ft->transferred += length; |
1463 | 1464 | ||
1464 | if (ft->slots_allocated) { | 1465 | if (ft->slots_allocated) { |
@@ -1541,7 +1542,7 @@ static void do_reqchunk_filecb(Messenger *m, int32_t friendnumber, void *userdat | |||
1541 | } | 1542 | } |
1542 | } | 1543 | } |
1543 | 1544 | ||
1544 | /* TODO: if file is too slow, switch to the next. */ | 1545 | /* TODO(irungentoo): if file is too slow, switch to the next. */ |
1545 | if (ft->slots_allocated > (unsigned int)free_slots) { | 1546 | if (ft->slots_allocated > (unsigned int)free_slots) { |
1546 | free_slots = 0; | 1547 | free_slots = 0; |
1547 | } else { | 1548 | } else { |
@@ -1600,7 +1601,7 @@ static void break_files(const Messenger *m, int32_t friendnumber) | |||
1600 | { | 1601 | { |
1601 | uint32_t i; | 1602 | uint32_t i; |
1602 | 1603 | ||
1603 | //TODO: Inform the client which file transfers get killed with a callback? | 1604 | // TODO(irungentoo): Inform the client which file transfers get killed with a callback? |
1604 | for (i = 0; i < MAX_CONCURRENT_FILE_PIPES; ++i) { | 1605 | for (i = 0; i < MAX_CONCURRENT_FILE_PIPES; ++i) { |
1605 | if (m->friendlist[friendnumber].file_sending[i].status != FILESTATUS_NONE) { | 1606 | if (m->friendlist[friendnumber].file_sending[i].status != FILESTATUS_NONE) { |
1606 | m->friendlist[friendnumber].file_sending[i].status = FILESTATUS_NONE; | 1607 | m->friendlist[friendnumber].file_sending[i].status = FILESTATUS_NONE; |
@@ -2438,7 +2439,7 @@ static char *ID2String(const uint8_t *pk) | |||
2438 | } | 2439 | } |
2439 | 2440 | ||
2440 | /* Minimum messenger run interval in ms | 2441 | /* Minimum messenger run interval in ms |
2441 | TODO: A/V */ | 2442 | TODO(mannol): A/V */ |
2442 | #define MIN_RUN_INTERVAL 50 | 2443 | #define MIN_RUN_INTERVAL 50 |
2443 | 2444 | ||
2444 | /* Return the time in milliseconds before do_messenger() should be called again | 2445 | /* Return the time in milliseconds before do_messenger() should be called again |
@@ -2710,7 +2711,7 @@ static int friends_list_load(Messenger *m, const uint8_t *data, uint32_t length) | |||
2710 | net_to_host(last_seen_time, sizeof(uint64_t)); | 2711 | net_to_host(last_seen_time, sizeof(uint64_t)); |
2711 | memcpy(&m->friendlist[fnum].last_seen_time, last_seen_time, sizeof(uint64_t)); | 2712 | memcpy(&m->friendlist[fnum].last_seen_time, last_seen_time, sizeof(uint64_t)); |
2712 | } else if (temp.status != 0) { | 2713 | } else if (temp.status != 0) { |
2713 | /* TODO: This is not a good way to do this. */ | 2714 | /* TODO(irungentoo): This is not a good way to do this. */ |
2714 | uint8_t address[FRIEND_ADDRESS_SIZE]; | 2715 | uint8_t address[FRIEND_ADDRESS_SIZE]; |
2715 | id_copy(address, temp.real_pk); | 2716 | id_copy(address, temp.real_pk); |
2716 | memcpy(address + crypto_box_PUBLICKEYBYTES, &(temp.friendrequest_nospam), sizeof(uint32_t)); | 2717 | memcpy(address + crypto_box_PUBLICKEYBYTES, &(temp.friendrequest_nospam), sizeof(uint32_t)); |