Changeset 12767e3


Ignore:
Timestamp:
2010-08-14T11:30:40Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d93c0eb9
Parents:
73efe3a
Message:

Status/Away messages.

Location:
protocols/msn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r73efe3a r12767e3  
    3939        set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc );
    4040        set_add( &acc->set, "switchboard_keepalives", "false", set_eval_bool, acc );
     41       
     42        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE;
    4143}
    4244
     
    182184{
    183185        char buf[1024];
     186        char *uux;
    184187        struct msn_data *md = ic->proto_data;
    185188       
     
    190193       
    191194        g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );
    192         msn_write( ic, buf, strlen( buf ) );
     195        if( !msn_write( ic, buf, strlen( buf ) ) )
     196                return;
     197       
     198        uux = g_markup_printf_escaped( "<Data><PSM>%s</PSM><CurrentMedia></CurrentMedia>"
     199                                       "</Data>", message ? message : "" );
     200        g_snprintf( buf, sizeof( buf ), "UUX %d %zd\r\n%s", ++md->trId, strlen( uux ), uux );
     201        if( !msn_write( ic, buf, strlen( buf ) ) )
     202                return;
    193203}
    194204
  • protocols/msn/soap.c

    r73efe3a r12767e3  
    5151} msn_soap_result_t;
    5252
     53struct msn_soap_req_data;
     54typedef int (*msn_soap_func) ( struct msn_soap_req_data * );
     55
    5356struct msn_soap_req_data
    5457{
     
    6366        msn_soap_func build_request, handle_response, free_data;
    6467};
    65 
    66 typedef int (*msn_soap_func) ( struct msn_soap_req_data * );
    6768
    6869static int msn_soap_send_request( struct msn_soap_req_data *req );
     
    527528        char *id = NULL, *name = NULL;
    528529        struct msn_soap_req_data *soap_req = data;
    529         struct im_connection *ic = soap_req->ic;
    530530       
    531531        if( ( p = node->parent ) &&
Note: See TracChangeset for help on using the changeset viewer.