Changeset 080c43a for protocols/msn/sb.c


Ignore:
Timestamp:
2012-09-16T13:52:19Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
79bb7e4
Parents:
f9258ae
Message:

Some more tweaks: Should show up online now, and be able to send and receive
messages. Seeing online state is still a problem due to the protocol#: gunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/sb.c

    rf9258ae r080c43a  
    308308        struct msn_switchboard *sb = data;
    309309        struct im_connection *ic;
     310        struct msn_data *md;
    310311        char buf[1024];
    311312       
     
    315316       
    316317        ic = sb->ic;
     318        md = ic->proto_data;
    317319       
    318320        if( source != sb->fd )
     
    332334       
    333335        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 );
    335337        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 );
    337339       
    338340        if( msn_sb_write( sb, "%s", buf ) )
     
    462464                        }
    463465                       
    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] );
    465472                       
    466473                        if( num == tot )
     
    506513                        return( 0 );
    507514                }
     515               
     516                /* See IRO above. Handle "bare JIDs" only. */
     517                if( strchr( cmd[1], ';' ) )
     518                        return 1;
    508519               
    509520                if( sb->who && g_strcasecmp( cmd[1], sb->who ) == 0 )
     
    541552                        return( st );
    542553                }
     554                else if( strcmp( cmd[1], ic->acc->user ) == 0 )
     555                {
     556                        /* Well, gee thanks. Thanks for letting me know I've arrived.. */
     557                }
    543558                else if( sb->who )
    544559                {
Note: See TracChangeset for help on using the changeset viewer.