X-Git-Url: http://git.cascardo.info/?p=cascardo%2Ff2fchat.git;a=blobdiff_plain;f=friend.c;h=2e50f3677177d33151c877e6c7bda305f75475e6;hp=03d306da94479620cb797d389e20cefd590ed0c6;hb=eba9ab6a3f362ecd814ac85b62f22d3bf85f22d6;hpb=f7c4d6ccc1fd3c452481a2d085486f8dec3860fb diff --git a/friend.c b/friend.c index 03d306d..2e50f36 100644 --- a/friend.c +++ b/friend.c @@ -81,6 +81,7 @@ void friend_timeout(struct friend *friend) void friend_got_message(struct friend *friend, char *buffer, size_t len) { if (len >= 4 && !strncmp(buffer, "PING", 4)) { + friend->state = STATE_ONLINE; pong(friend); } else if (len >= 4 && !strncmp(buffer, "PONG", 4)) { friend->state = STATE_ONLINE;