Changeset e132b60 for protocols/nogaim.c
- Timestamp:
- 2012-11-11T23:32:47Z (12 years ago)
- Branches:
- master
- Children:
- 67ebc8e
- Parents:
- dd672e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
rdd672e2 re132b60 261 261 struct im_connection *ic = d; 262 262 263 if( ( ic->flags & OPT_PONGS ) && !( ic->flags & OPT_PONGED ) ) 264 { 265 /* This protocol is expected to ack keepalives and hasn't 266 since the last time we were here. */ 267 imcb_error( ic, "Connection timeout" ); 268 imc_logout( ic, TRUE ); 269 return FALSE; 270 } 271 ic->flags &= ~OPT_PONGED; 272 263 273 if( ic->acc->prpl->keepalive ) 264 274 ic->acc->prpl->keepalive( ic ); 265 275 266 276 return TRUE; 277 } 278 279 void start_keepalives( struct im_connection *ic, int interval ) 280 { 281 b_event_remove( ic->keepalive ); 282 ic->keepalive = b_timeout_add( interval, send_keepalive, ic ); 283 284 /* Connecting successfully counts as a first successful pong. */ 285 if( ic->flags & OPT_PONGS ) 286 ic->flags |= OPT_PONGED; 267 287 } 268 288 … … 277 297 imcb_log( ic, "Logged in" ); 278 298 279 b_event_remove( ic->keepalive );280 ic->keepalive = b_timeout_add( 60000, send_keepalive, ic );281 299 ic->flags |= OPT_LOGGED_IN; 300 if( !ic->keepalive ) 301 start_keepalives( ic, 60000 ); 282 302 283 303 /* Necessary to send initial presence status, even if we're not away. */
Note: See TracChangeset
for help on using the changeset viewer.