Changeset 899c8e8
- Timestamp:
- 2015-05-31T02:40:05Z (10 years ago)
- Children:
- 3fb7139
- Parents:
- ef9ee0e
- git-author:
- dequis <dx@…> (19-04-15 07:36:06)
- git-committer:
- dequis <dx@…> (31-05-15 02:40:05)
- Location:
- protocols/msn
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
ref9ee0e r899c8e8 191 191 "/user", "application/user+xml", 192 192 strlen(body), body); 193 msn_ns_write (ic, "PUT %d %zd\r\n%s", ++md->trId, strlen(buf), buf);193 msn_ns_write_cmd(ic, "PUT", "MSGR\\PRESENCE", buf); 194 194 195 195 g_free(buf); -
protocols/msn/msn.h
ref9ee0e r899c8e8 199 199 /* ns.c */ 200 200 int msn_ns_write(struct im_connection *ic, const char *fmt, ...) G_GNUC_PRINTF(2, 3); 201 int msn_ns_write_cmd(struct im_connection *ic, const char *cmd, const char *params, const char *payload); 201 202 gboolean msn_ns_connect(struct im_connection *ic, const char *host, int port); 202 203 void msn_ns_close(struct msn_data *handler); -
protocols/msn/ns.c
ref9ee0e r899c8e8 294 294 g_free(resp); 295 295 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)) { 298 299 msn_ns_send_adl(ic); 299 300 return msn_ns_finish_login(ic); … … 473 474 474 475 } 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); 476 477 msn_ns_nfy(md, who, parts, action, is_put); 477 478 } … … 657 658 adls = xt_to_string(adl); 658 659 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); 660 661 g_free(adls); 661 662 } … … 714 715 715 716 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); 717 718 g_free(buf); 718 719 return retval;
Note: See TracChangeset
for help on using the changeset viewer.