Mercurial > pidgin.yaz
diff src/protocols/msn/switchboard.c @ 6826:2adf21e70601
[gaim-migrate @ 7371]
Fixed message length problems for binary and text.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 13 Sep 2003 23:28:08 +0000 |
parents | 662f5bef41b7 |
children | 1cfbb731aa1f |
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c Sat Sep 13 21:01:26 2003 +0000 +++ b/src/protocols/msn/switchboard.c Sat Sep 13 23:28:08 2003 +0000 @@ -46,6 +46,9 @@ msn_message_set_body(msg, MSN_CLIENTINFO); if (!msn_switchboard_send_msg(swboard, msg)) { + gaim_debug_warning("msn", + "Unable to send clientcaps. " + "Disconnecting from switchboard.\n"); msn_switchboard_destroy(swboard); msn_message_destroy(msg); @@ -110,7 +113,7 @@ } #endif - return FALSE; + return TRUE; } static gboolean @@ -634,13 +637,14 @@ msn_switchboard_send_msg(MsnSwitchBoard *swboard, MsnMessage *msg) { char *buf; + size_t len; int ret; g_return_val_if_fail(swboard != NULL, FALSE); g_return_val_if_fail(msg != NULL, FALSE); msn_message_set_transaction_id(msg, ++swboard->trId); - buf = msn_message_build_string(msg); + buf = msn_message_to_string(msg, &len); g_return_val_if_fail(buf != NULL, FALSE); @@ -653,7 +657,7 @@ return TRUE; } - ret = msn_servconn_write(swboard->servconn, buf, strlen(buf)); + ret = msn_servconn_write(swboard->servconn, buf, len); g_free(buf);