summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/Messenger.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index f125c264..f22a8d57 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -516,8 +516,10 @@ static int send_userstatus(Messenger *m, int friendnumber, USERSTATUS status)
516 516
517static int send_ping(Messenger *m, int friendnumber) 517static int send_ping(Messenger *m, int friendnumber)
518{ 518{
519 m->friendlist[friendnumber].ping_lastsent = unix_time(); 519 int ret = write_cryptpacket_id(m, friendnumber, PACKET_ID_PING, 0, 0);
520 return write_cryptpacket_id(m, friendnumber, PACKET_ID_PING, 0, 0); 520 if (ret == 1)
521 m->friendlist[friendnumber].ping_lastsent = unix_time();
522 return ret;
521} 523}
522 524
523static int set_friend_statusmessage(Messenger *m, int friendnumber, uint8_t *status, uint16_t length) 525static int set_friend_statusmessage(Messenger *m, int friendnumber, uint8_t *status, uint16_t length)