Mercurial > pidgin
changeset 23549:e216872e6c8a
merge of '2b34b093b628670d60af5d699520a5dcede1fe74'
and '65e73f7e533081f8384902e8722f0a09beb77e60'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Wed, 16 Jul 2008 00:59:19 +0000 |
parents | 95a7d1a72fd9 (current diff) 8c2650fb7253 (diff) |
children | fe2e20ff3345 |
files | |
diffstat | 6 files changed, 30 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Mon Jul 14 06:33:05 2008 +0000 +++ b/COPYRIGHT Wed Jul 16 00:59:19 2008 +0000 @@ -8,7 +8,6 @@ Dave Ahlswede Manuel Amador Matt Amato -Elliott Sales de Andrade Geoffrey Antos Daniel Atallah Paul Aurich @@ -230,6 +229,7 @@ Wesley Lin Artem Litvinovich Josh Littlefield +Daniel Ljungborg Syd Logan Lokheed Norberto Lopes @@ -340,6 +340,7 @@ Michael Ruprecht Sam S. Thanumalayan S. +Elliott Sales de Andrade Tomasz Sałaciński <tsalacinski@gmail.com> Pradyumna Sampath Arvind Samptur
--- a/ChangeLog Mon Jul 14 06:33:05 2008 +0000 +++ b/ChangeLog Wed Jul 16 00:59:19 2008 +0000 @@ -12,7 +12,8 @@ MSN: * Update MSN support to protocol 15 (Elliott Sales de Andrade, Jorge - Villaseñor, Mike Ruprecht, Carlos Silva, Ma Yuan, Dimmuxx and others) + Villaseñor, Mike Ruprecht, Carlos Silva, Ma Yuan, Daniel Ljungborg + and others) * Personal messages are now supported. They are treated as status messages. * Offline IM is now supported.
--- a/libpurple/plugin.h Mon Jul 14 06:33:05 2008 +0000 +++ b/libpurple/plugin.h Wed Jul 16 00:59:19 2008 +0000 @@ -199,9 +199,10 @@ * Handles the initialization of modules. */ #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) +# define _FUNC_NAME(x) purple_init_##x##_plugin # define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \ - gboolean purple_init_##pluginname##_plugin(void);\ - gboolean purple_init_##pluginname##_plugin(void) { \ + gboolean _FUNC_NAME(pluginname)(void);\ + gboolean _FUNC_NAME(pluginname)(void) { \ PurplePlugin *plugin = purple_plugin_new(TRUE, NULL); \ plugin->info = &(plugininfo); \ initfunc((plugin)); \
--- a/libpurple/protocols/msn/httpconn.c Mon Jul 14 06:33:05 2008 +0000 +++ b/libpurple/protocols/msn/httpconn.c Wed Jul 16 00:59:19 2008 +0000 @@ -381,6 +381,7 @@ else { msn_cmdproc_process_cmd_text(servconn->cmdproc, cur); + servconn->payload_len = servconn->cmdproc->last_cmd->payload_len; } } while (servconn->connected && servconn->rx_len > 0);
--- a/libpurple/protocols/msn/oim.c Mon Jul 14 06:33:05 2008 +0000 +++ b/libpurple/protocols/msn/oim.c Wed Jul 16 00:59:19 2008 +0000 @@ -270,16 +270,31 @@ static gchar * msn_oim_msg_to_str(MsnOim *oim, const char *body) { - char *oim_body,*oim_base64; + GString *oim_body; + char *oim_base64; + char *c; + int len; + + purple_debug_info("msn", "Encoding OIM Message...\n"); + len = strlen(body); + c = oim_base64 = purple_base64_encode((const guchar *)body, len); + purple_debug_info("msn", "Encoded base64 body:{%s}\n", oim_base64); - purple_debug_info("msn", "encode OIM Message...\n"); - oim_base64 = purple_base64_encode((const guchar *)body, strlen(body)); - purple_debug_info("msn", "encoded base64 body:{%s}\n", oim_base64); - oim_body = g_strdup_printf(MSN_OIM_MSG_TEMPLATE, - oim->run_id,oim->send_seq,oim_base64); + oim_body = g_string_new(NULL); + g_string_printf(oim_body, MSN_OIM_MSG_TEMPLATE, + oim->run_id, oim->send_seq); + + len = ((len / 3) + 1) * 4 - 76; + while ((c - oim_base64) < len) { + g_string_append_len(oim_body, c, 76); + g_string_append_c(oim_body, '\n'); + c += 76; + } + g_string_append(oim_body, c); + g_free(oim_base64); - return oim_body; + return g_string_free(oim_body, FALSE); } /*
--- a/libpurple/protocols/msn/switchboard.c Mon Jul 14 06:33:05 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.c Wed Jul 16 00:59:19 2008 +0000 @@ -1144,7 +1144,6 @@ swboard->error = MSN_SB_ERROR_USER_OFFLINE; msg_error_helper(swboard->cmdproc, msg, MSN_MSG_ERROR_SB); - msn_message_unref(msg); } cal_error_helper(trans, reason); }