Changeset 91d6e91 for protocols


Ignore:
Timestamp:
2010-08-13T09:12:31Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
50b8978
Parents:
b46769d
Message:

Sending offline messages works now ... but Pidgin doesn't seem to receive them. :-/

Location:
protocols/msn
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    rb46769d r91d6e91  
    106106                g_free( md->tokens[0] );
    107107                g_free( md->tokens[1] );
     108                g_free( md->tokens[2] );
    108109                g_free( md->lock_key );
    109110               
  • protocols/msn/msn.h

    rb46769d r91d6e91  
    4949*/
    5050
    51 #define MSNP11_PROD_KEY "RG@XY*28Q5QHS%Q5"
    52 #define MSNP11_PROD_ID  "PROD0113H11T8$X_"
     51#define MSNP11_PROD_KEY "ILTXC!4IXB5FB*PX"
     52//PK}_A_0N_K%O?A9S"
     53#define MSNP11_PROD_ID  "PROD0119GSJUC$18"
     54//PROD0114ES4Z%Q5W"
     55#define MSNP_VER        "MSNP15"
     56#define MSNP_BUILD      "8.5.1288"
     57//"8.1.0178"
    5358
    5459#define MSN_SB_NEW         -24062002
     
    7984       
    8085        int trId;
    81         char *tokens[2];
     86        char *tokens[3];
    8287        char *lock_key;
    8388       
  • protocols/msn/ns.c

    rb46769d r91d6e91  
    7474        md->handler->rxq = g_new0( char, 1 );
    7575       
    76         g_snprintf( s, sizeof( s ), "VER %d MSNP15 CVR0\r\n", ++md->trId );
     76        g_snprintf( s, sizeof( s ), "VER %d %s CVR0\r\n", ++md->trId, MSNP_VER );
    7777        if( msn_write( ic, s, strlen( s ) ) )
    7878        {
     
    114114        if( strcmp( cmd[0], "VER" ) == 0 )
    115115        {
    116                 if( cmd[2] && strncmp( cmd[2], "MSNP15", 5 ) != 0 )
     116                if( cmd[2] && strncmp( cmd[2], MSNP_VER, 5 ) != 0 )
    117117                {
    118118                        imcb_error( ic, "Unsupported protocol" );
  • protocols/msn/soap.c

    rb46769d r91d6e91  
    178178                sd->secret = g_strdup( p->text );
    179179       
    180         if( *id == '1' )
    181                 md->tokens[0] = g_strdup( node->text );
    182         else if( *id == '2' )
    183                 md->tokens[1] = g_strdup( node->text );
     180        *id -= '1';
     181        if( *id >= 0 && *id <= 2 )
     182        {
     183                g_free( md->tokens[(int)*id] );
     184                md->tokens[(int)*id] = g_strdup( node->text );
     185        }
    184186       
    185187        return XT_HANDLED;
     
    310312        char *display_name_b64;
    311313       
    312         display_name_b64 = tobase64( ic->displayname );
     314        display_name_b64 = tobase64( set_getstr( &ic->acc->set, "display_name" ) );
    313315       
    314316        soap_req->url = g_strdup( SOAP_OIM_SEND_URL );
    315317        soap_req->action = g_strdup( SOAP_OIM_SEND_ACTION );
    316318        soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD,
    317                 ic->acc->user, display_name_b64, oim->to, "bla", //md->passport_token,
     319                ic->acc->user, display_name_b64, MSNP_VER, MSNP_BUILD,
     320                oim->to, md->tokens[2],
    318321                MSNP11_PROD_ID, md->lock_key ? md->lock_key : "",
    319322                oim->number, oim->number, oim->msg );
  • protocols/msn/soap.h

    rb46769d r91d6e91  
    111111               "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"MBI\"></wsse:PolicyReference>" \
    112112           "</wst:RequestSecurityToken>" \
     113           "<wst:RequestSecurityToken Id=\"RST3\">" \
     114               "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>" \
     115               "<wsp:AppliesTo>" \
     116                   "<wsa:EndpointReference>" \
     117                       "<wsa:Address>messengersecure.live.com</wsa:Address>" \
     118                   "</wsa:EndpointReference>" \
     119               "</wsp:AppliesTo>" \
     120               "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"MBI_SSL\"></wsse:PolicyReference>" \
     121           "</wst:RequestSecurityToken>" \
    113122       "</ps:RequestMultipleSecurityTokens>" \
    114123   "</Body>" \
     
    119128
    120129#define SOAP_OIM_SEND_URL "https://ows.messenger.msn.com/OimWS/oim.asmx"
    121 #define SOAP_OIM_SEND_ACTION "http://messenger.msn.com/ws/2004/09/oim/Store"
     130#define SOAP_OIM_SEND_ACTION "http://messenger.live.com/ws/2006/09/oim/Store2"
    122131
    123132#define SOAP_OIM_SEND_PAYLOAD \
     
    125134"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \
    126135"<soap:Header>" \
    127   "<From memberName=\"%s\" friendlyName=\"=?utf-8?B?%s?=\" xml:lang=\"nl-nl\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"MSNP13\" buildVer=\"8.0.0328\"/>" \
     136  "<From memberName=\"%s\" friendlyName=\"=?utf-8?B?%s?=\" xml:lang=\"nl-nl\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"%s\" buildVer=\"%s\"/>" \
    128137  "<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \
    129138  "<Ticket passport=\"%s\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \
Note: See TracChangeset for help on using the changeset viewer.