comparison libgaim/connection.c @ 14483:af856551902b

[gaim-migrate @ 17202] Don't register the connection keepalive timer if the prpl doesn't support keepalives committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Sat, 09 Sep 2006 19:41:34 +0000
parents 60b1bc8dbf37
children f283ebe419e4
comparison
equal deleted inserted replaced
14482:a5c7db7be826 14483:af856551902b
59 } 59 }
60 60
61 static void 61 static void
62 update_keepalive(GaimConnection *gc, gboolean on) 62 update_keepalive(GaimConnection *gc, gboolean on)
63 { 63 {
64 GaimPluginProtocolInfo *prpl_info = NULL;
65
66 if (gc != NULL && gc->prpl != NULL)
67 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
68
69 if (!prpl_info || !prpl_info->keepalive)
70 return;
71
64 if (on && !gc->keepalive) 72 if (on && !gc->keepalive)
65 { 73 {
66 gaim_debug_info("connection", "Activating keepalive.\n"); 74 gaim_debug_info("connection", "Activating keepalive.\n");
67 gc->keepalive = gaim_timeout_add(30000, send_keepalive, gc); 75 gc->keepalive = gaim_timeout_add(30000, send_keepalive, gc);
68 } 76 }