Changeset 080c43a
- Timestamp:
- 2012-09-16T13:52:19Z (12 years ago)
- Branches:
- master
- Children:
- 79bb7e4
- Parents:
- f9258ae
- Location:
- protocols/msn
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rf9258ae r080c43a 191 191 md->away_state = msn_away_state_list + 1; 192 192 193 if( !msn_ns_write( ic, -1, "CHG %d %s \r\n", ++md->trId, md->away_state->code) )193 if( !msn_ns_write( ic, -1, "CHG %d %s %d:%02d\r\n", ++md->trId, md->away_state->code, MSN_CAP1, MSN_CAP2 ) ) 194 194 return; 195 195 196 uux = g_markup_printf_escaped( "<Data><PSM>%s</PSM><CurrentMedia></CurrentMedia>" 197 "</Data>", message ? message : "" ); 196 uux = g_markup_printf_escaped( "<EndpointData><Capabilities>%d:%02d" 197 "</Capabilities></EndpointData>", 198 MSN_CAP1, MSN_CAP2 ); 199 msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux ); 200 g_free( uux ); 201 202 uux = g_markup_printf_escaped( "<PrivateEndpointData><EpName>%s</EpName>" 203 "<Idle>%s</Idle><ClientType>%d</ClientType>" 204 "<State>%s</State></PrivateEndpointData>", 205 md->uuid, 206 strcmp( md->away_state->code, "IDL" ) ? "false" : "true", 207 1, /* ? */ 208 md->away_state->code ); 209 msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux ); 210 g_free( uux ); 211 212 uux = g_markup_printf_escaped( "<Data><DDP></DDP><PSM>%s</PSM>" 213 "<CurrentMedia></CurrentMedia>" 214 "<MachineGuid>%s</MachineGuid></Data>", 215 message ? message : "", md->uuid ); 198 216 msn_ns_write( ic, -1, "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux ); 199 217 g_free( uux ); -
protocols/msn/msn.h
rf9258ae r080c43a 64 64 65 65 #define MSN_SB_NEW -24062002 66 67 #define MSN_CAP1 0xC000 68 #define MSN_CAP2 0x0000 66 69 67 70 #define MSN_MESSAGE_HEADERS "MIME-Version: 1.0\r\n" \ -
protocols/msn/ns.c
rf9258ae r080c43a 574 574 { 575 575 /* Status message. */ 576 if( num_parts >= 4)577 handler->msglen = atoi( cmd[ 3] );576 if( num_parts >= 3 ) 577 handler->msglen = atoi( cmd[2] ); 578 578 } 579 579 else if( strcmp( cmd[0], "NOT" ) == 0 ) -
protocols/msn/sb.c
rf9258ae r080c43a 308 308 struct msn_switchboard *sb = data; 309 309 struct im_connection *ic; 310 struct msn_data *md; 310 311 char buf[1024]; 311 312 … … 315 316 316 317 ic = sb->ic; 318 md = ic->proto_data; 317 319 318 320 if( source != sb->fd ) … … 332 334 333 335 if( sb->session == MSN_SB_NEW ) 334 g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->acc->user, sb->key );336 g_snprintf( buf, sizeof( buf ), "USR %d %s;{%s} %s\r\n", ++sb->trId, ic->acc->user, md->uuid, sb->key ); 335 337 else 336 g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->acc->user, sb->key, sb->session );338 g_snprintf( buf, sizeof( buf ), "ANS %d %s;{%s} %s %d\r\n", ++sb->trId, ic->acc->user, md->uuid, sb->key, sb->session ); 337 339 338 340 if( msn_sb_write( sb, "%s", buf ) ) … … 462 464 } 463 465 464 imcb_chat_add_buddy( sb->chat, cmd[4] ); 466 /* For as much as I understand this MPOP stuff now, a 467 switchboard has two (or more) roster entries per 468 participant. One "bare JID" and one JID;UUID. Ignore 469 the latter. */ 470 if( !strchr( cmd[4], ';' ) ) 471 imcb_chat_add_buddy( sb->chat, cmd[4] ); 465 472 466 473 if( num == tot ) … … 506 513 return( 0 ); 507 514 } 515 516 /* See IRO above. Handle "bare JIDs" only. */ 517 if( strchr( cmd[1], ';' ) ) 518 return 1; 508 519 509 520 if( sb->who && g_strcasecmp( cmd[1], sb->who ) == 0 ) … … 541 552 return( st ); 542 553 } 554 else if( strcmp( cmd[1], ic->acc->user ) == 0 ) 555 { 556 /* Well, gee thanks. Thanks for letting me know I've arrived.. */ 557 } 543 558 else if( sb->who ) 544 559 {
Note: See TracChangeset
for help on using the changeset viewer.