diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-24 09:57:49 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-24 09:57:49 -0400 |
commit | 1994c3cd890ffed436e3a41bc4a1fb642b056b91 (patch) | |
tree | a63e5d1aed5574abb0300a8fa60860a1381b50f1 | |
parent | 05a3851e437ccdf9912f661c7935f9064a61d135 (diff) |
Possible bug fixed.
-rw-r--r-- | toxcore/Messenger.c | 6 |
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 | ||
517 | static int send_ping(Messenger *m, int friendnumber) | 517 | static 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 | ||
523 | static int set_friend_statusmessage(Messenger *m, int friendnumber, uint8_t *status, uint16_t length) | 525 | static int set_friend_statusmessage(Messenger *m, int friendnumber, uint8_t *status, uint16_t length) |