Changeset e132b60
- Timestamp:
- 2012-11-11T23:32:47Z (12 years ago)
- Branches:
- master
- Children:
- 67ebc8e
- Parents:
- dd672e2
- Location:
- protocols
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rdd672e2 re132b60 53 53 54 54 ic->proto_data = md; 55 ic->flags |= OPT_PONGS | OPT_PONGED; 55 56 56 57 if( strchr( acc->user, '@' ) == NULL ) -
protocols/msn/ns.c
rdd672e2 re132b60 576 576 if( num_parts >= 7 ) 577 577 handler->msglen = atoi( cmd[6] ); 578 } 579 else if( strcmp( cmd[0], "QNG" ) == 0 ) 580 { 581 ic->flags |= OPT_PONGED; 578 582 } 579 583 else if( isdigit( cmd[0][0] ) ) -
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. */ -
protocols/nogaim.h
rdd672e2 re132b60 68 68 #define OPT_THINKING 0x00000200 /* about these values... Stupid me! */ 69 69 #define OPT_NOOTR 0x00001000 /* protocol not suitable for OTR */ 70 #define OPT_PONGS 0x00010000 /* Service sends us keep-alives */ 71 #define OPT_PONGED 0x00020000 /* Received a keep-alive during last interval */ 70 72 71 73 /* ok. now the fun begins. first we create a connection structure */ -
protocols/twitter/twitter.c
rdd672e2 re132b60 72 72 us the rest. \o/ */ 73 73 twitter_open_stream(ic); 74 ic->flags |= OPT_PONGS; 74 75 } else { 75 76 /* Not using the streaming API, so keep polling the old- -
protocols/twitter/twitter_lib.c
rdd672e2 re132b60 740 740 return; 741 741 742 ic->flags |= OPT_PONGED; 742 743 td = ic->proto_data; 743 744
Note: See TracChangeset
for help on using the changeset viewer.