Changeset 899c8e8 for protocols/msn/ns.c


Ignore:
Timestamp:
2015-05-31T02:40:05Z (9 years ago)
Author:
dequis <dx@…>
Children:
3fb7139
Parents:
ef9ee0e
git-author:
dequis <dx@…> (19-04-15 07:36:06)
git-committer:
dequis <dx@…> (31-05-15 02:40:05)
Message:

msn: misc MSNP24 command format changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    ref9ee0e r899c8e8  
    294294                g_free(resp);
    295295
    296         } else if (strcmp(cmd[0], "ADL") == 0) {
    297                 if (num_parts >= 3 && strcmp(cmd[2], "OK") == 0) {
     296        } else if (strcmp(cmd[0], "PUT") == 0) {
     297                /* We could keep track TrIDs... or we could guess what this PUT means */
     298                if ((md->flags & MSN_DONE_BND) && !(md->flags & MSN_DONE_ADL)) {
    298299                        msn_ns_send_adl(ic);
    299300                        return msn_ns_finish_login(ic);
     
    473474
    474475        } else if ((strcmp(cmd[0], "NFY") == 0) && (action = get_rfc822_header(parts[2], "Uri", 0))) {
    475                 gboolean is_put = (strcmp(cmd[1], "PUT") == 0);
     476                gboolean is_put = (strcmp(cmd[2], "MSGR\\PUT") == 0);
    476477                msn_ns_nfy(md, who, parts, action, is_put);
    477478        }
     
    657658        adls = xt_to_string(adl);
    658659        xt_free_node(adl);
    659         msn_ns_write(ic, "ADL %d %zd\r\n%s", ++md->trId, strlen(adls), adls);
     660        msn_ns_write_cmd(ic, "PUT", "MSGR\\CONTACTS", adls);
    660661        g_free(adls);
    661662}
     
    714715
    715716        buf = g_strdup_printf(MSN_MESSAGE_HEADERS, bu->handle, ic->acc->user, md->uuid, message_type, strlen(text), text);
    716         retval = msn_ns_write(ic, "SDG %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
     717        retval = msn_ns_write_cmd(ic, "SDG", "MSGR", buf);
    717718        g_free(buf);
    718719        return retval;
Note: See TracChangeset for help on using the changeset viewer.