summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index 0c23821e..7ea89ea6 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -1788,7 +1788,11 @@ int send_custom_lossless_packet(const Messenger *m, int32_t friendnumber, const
1788 if (m->friendlist[friendnumber].crypt_connection_id == -1) 1788 if (m->friendlist[friendnumber].crypt_connection_id == -1)
1789 return -1; 1789 return -1;
1790 1790
1791 return write_cryptpacket(m->net_crypto, m->friendlist[friendnumber].crypt_connection_id, data, length, 1) != -1; 1791 if (write_cryptpacket(m->net_crypto, m->friendlist[friendnumber].crypt_connection_id, data, length, 1) == -1) {
1792 return -1;
1793 } else {
1794 return 0;
1795 }
1792} 1796}
1793 1797
1794/* Function to filter out some friend requests*/ 1798/* Function to filter out some friend requests*/