diff libpurple/protocols/jabber/jabber.c @ 22149:252b96b6a32c

Don't send keep-alives if we've received data since in the last KEEPALIVE_INTERVAL seconds
author Sean Egan <seanegan@gmail.com>
date Wed, 23 Jan 2008 23:28:38 +0000
parents eab7d03edfcb
children dc47e908965f f5bcb58bdf56 e9cf897bd873
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Thu Jan 17 21:08:20 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Wed Jan 23 23:28:38 2008 +0000
@@ -432,6 +432,7 @@
 	}
 
 	while((len = purple_ssl_read(gsc, buf, sizeof(buf) - 1)) > 0) {
+		gc->last_received = time(NULL);
 		buf[len] = '\0';
 		purple_debug(PURPLE_DEBUG_INFO, "jabber", "Recv (ssl)(%d): %s\n", len, buf);
 		jabber_parser_process(js, buf, len);
@@ -459,6 +460,7 @@
 		return;
 
 	if((len = read(js->fd, buf, sizeof(buf) - 1)) > 0) {
+		gc->last_received = time(NULL);
 #ifdef HAVE_CYRUS_SASL
 		if (js->sasl_maxbuf>0) {
 			const char *out;