Some messenger fixes.

This commit is contained in:
irungentoo 2015-04-18 11:15:59 -04:00
parent eb0f50d297
commit 453548f181
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -493,10 +493,6 @@ int m_send_message_generic(Messenger *m, int32_t friendnumber, uint8_t type, con
uint32_t msg_id = ++m->friendlist[friendnumber].message_id; uint32_t msg_id = ++m->friendlist[friendnumber].message_id;
if (msg_id == 0) {
msg_id = ++m->friendlist[friendnumber].message_id; // Otherwise, false error
}
add_receipt(m, friendnumber, packet_num, msg_id); add_receipt(m, friendnumber, packet_num, msg_id);
if (message_id) if (message_id)
@ -1362,7 +1358,7 @@ int file_data(const Messenger *m, int32_t friendnumber, uint32_t filenumber, uin
if (m->friendlist[friendnumber].status != FRIEND_ONLINE) if (m->friendlist[friendnumber].status != FRIEND_ONLINE)
return -2; return -2;
if (filenumber > MAX_CONCURRENT_FILE_PIPES) if (filenumber >= MAX_CONCURRENT_FILE_PIPES)
return -3; return -3;
struct File_Transfers *ft = &m->friendlist[friendnumber].file_sending[filenumber]; struct File_Transfers *ft = &m->friendlist[friendnumber].file_sending[filenumber];