Changeset 3752019 for protocols/msn/ns.c


Ignore:
Timestamp:
2015-03-15T14:41:47Z (9 years ago)
Author:
dequis <dx@…>
Children:
ffa5b70
Parents:
fa8c775
git-author:
dequis <dx@…> (08-03-15 04:28:49)
git-committer:
dequis <dx@…> (15-03-15 14:41:47)
Message:

msn: start update to msnp21

  • bump protocol version
  • update CVR parameters
  • don't send BLP, send ADL right after getting contact list
  • NFY payload size parsing
  • MSNP21 style ADL
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    rfa8c775 r3752019  
    185185                }
    186186
    187                 return(msn_ns_write(ic, handler->fd, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s\r\n",
     187                return(msn_ns_write(ic, handler->fd, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s VmVyc2lvbjogMQ0KWGZyQ291bnQ6IDINClhmclNlbnRVVENUaW1lOiA2MzU2MTQ3OTU5NzgzOTAwMDANCklzR2VvWGZyOiB0cnVlDQo=\r\n",
    188188                                    ++md->trId, ic->acc->user));
    189189        } else if (strcmp(cmd[0], "CVR") == 0) {
     
    297297                        return(0);
    298298                }
    299         } else if (strcmp(cmd[0], "BLP") == 0) {
    300                 msn_ns_send_adl_start(ic);
    301                 return msn_ns_finish_login(ic);
    302299        } else if (strcmp(cmd[0], "ADL") == 0) {
    303300                if (num_parts >= 3 && strcmp(cmd[2], "OK") == 0) {
     
    497494                        handler->msglen = atoi(cmd[1]);
    498495                }
     496        } else if (strcmp(cmd[0], "NFY") == 0) {
     497                if (num_parts >= 3) {
     498                        handler->msglen = atoi(cmd[2]);
     499                }
    499500        } else if (strcmp(cmd[0], "UBM") == 0) {
    500501                if (num_parts >= 7) {
     
    768769void msn_auth_got_contact_list(struct im_connection *ic)
    769770{
    770         struct msn_data *md;
    771 
    772771        /* Dead connection? */
    773772        if (g_slist_find(msn_connections, ic) == NULL) {
     
    775774        }
    776775
    777         md = ic->proto_data;
    778         msn_ns_write(ic, -1, "BLP %d %s\r\n", ++md->trId, "BL");
     776        msn_ns_send_adl_start(ic);
     777        msn_ns_finish_login(ic);
    779778}
    780779
    781780static gboolean msn_ns_send_adl_1(gpointer key, gpointer value, gpointer data)
    782781{
    783         struct xt_node *adl = data, *d, *c;
     782        struct xt_node *adl = data, *d, *c, *s;
    784783        struct bee_user *bu = value;
    785784        struct msn_buddy_data *bd = bu->data;
     
    810809        c = xt_new_node("c", NULL, NULL);
    811810        xt_add_attr(c, "n", handle);
    812         xt_add_attr(c, "l", l);
    813811        xt_add_attr(c, "t", "1");   /* FIXME: Network type, i.e. 32 for Y!MSG */
     812        s = xt_new_node("s", NULL, NULL);
     813        xt_add_attr(s, "n", "IM");
     814        xt_add_attr(s, "l", l);
     815        xt_insert_child(c, s);
    814816        xt_insert_child(d, c);
    815817
Note: See TracChangeset for help on using the changeset viewer.