Mercurial > pidgin.yaz
changeset 24449:afbc5c1203f2
merge of '55175ee4e57c664f82028c9b5f73853595fa1bb0'
and '7d89419579202cb24dbc5088c757bd2df127b910'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 23 Nov 2008 21:57:52 +0000 |
parents | fa81d76192bb (current diff) e7a419e04da0 (diff) |
children | dc7942955a7a |
files | |
diffstat | 6 files changed, 45 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/cmds.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/irc/cmds.c Sun Nov 23 21:57:52 2008 +0000 @@ -71,7 +71,7 @@ int irc_cmd_ctcp(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { /* we have defined args as args[0] is target and args[1] is ctcp command */ - char *buf; + char *buf; GString *string; /* check if we have args */ @@ -141,11 +141,11 @@ action[strlen(action) - 1] = '\0'; if (purple_conversation_get_type(convo) == PURPLE_CONV_TYPE_CHAT) serv_got_chat_in(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo)), - purple_connection_get_display_name(gc), - 0, action, time(NULL)); + purple_connection_get_display_name(gc), + 0, action, time(NULL)); else purple_conv_im_write(PURPLE_CONV_IM(convo), purple_connection_get_display_name(gc), - action, 0, time(NULL)); + action, 0, time(NULL)); g_free(action); } @@ -156,7 +156,6 @@ { char *buf; - if (!args || !args[0]) return 0;
--- a/libpurple/protocols/irc/dcc_send.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/irc/dcc_send.c Sun Nov 23 21:57:52 2008 +0000 @@ -302,7 +302,7 @@ if (sock < 0) { purple_notify_error(gc, NULL, _("File Transfer Failed"), - _("Could not open a listening port.")); + _("Could not open a listening port.")); purple_xfer_cancel_local(xfer); return; } @@ -313,14 +313,14 @@ purple_debug_misc("irc", "port is %hu\n", port); /* Monitor the listening socket */ xfer->watcher = purple_input_add(sock, PURPLE_INPUT_READ, - irc_dccsend_send_connected, xfer); + irc_dccsend_send_connected, xfer); /* Send the intended recipient the DCC request */ arg[0] = xfer->who; inet_aton(purple_network_get_my_ip(irc->fd), &addr); arg[1] = tmp = g_strdup_printf("\001DCC SEND \"%s\" %u %hu %" G_GSIZE_FORMAT "\001", - xfer->filename, ntohl(addr.s_addr), - port, xfer->size); + xfer->filename, ntohl(addr.s_addr), + port, xfer->size); irc_cmd_privmsg(gc->proto_data, "msg", NULL, arg); g_free(tmp); @@ -343,7 +343,7 @@ if (xd->listen_data == NULL) { purple_xfer_unref(xfer); purple_notify_error(gc, NULL, _("File Transfer Failed"), - _("Could not open a listening port.")); + _("Could not open a listening port.")); purple_xfer_cancel_local(xfer); }
--- a/libpurple/protocols/irc/msgs.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/irc/msgs.c Sun Nov 23 21:57:52 2008 +0000 @@ -123,10 +123,10 @@ void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args) { char *clean; - /* This, too, should be escaped somehow (smarter) */ - clean = purple_utf8_salvage(args[0]); + /* This, too, should be escaped somehow (smarter) */ + clean = purple_utf8_salvage(args[0]); purple_debug(PURPLE_DEBUG_INFO, "irc", "Unrecognized message: %s\n", clean); - g_free(clean); + g_free(clean); } void irc_msg_features(struct irc_conn *irc, const char *name, const char *from, char **args) @@ -814,8 +814,8 @@ purple_conversation_set_data(convo, IRC_NAMES_FLAG, GINT_TO_POINTER(FALSE)); /* Until purple_conversation_present does something that - * one would expect in Pidgin, this call produces buggy - * behavior both for the /join and auto-join cases. */ + * one would expect in Pidgin, this call produces buggy + * behavior both for the /join and auto-join cases. */ /* purple_conversation_present(convo); */ return; } @@ -1043,7 +1043,7 @@ return; /* Undernet likes to :-quote the channel name, for no good reason - * that I can see. This catches that. */ + * that I can see. This catches that. */ channel = (args[0][0] == ':') ? &args[0][1] : args[0]; convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, channel, irc->account); @@ -1056,8 +1056,8 @@ if (!purple_utf8_strcasecmp(nick, purple_connection_get_display_name(gc))) { char *escaped = g_markup_escape_text(args[1], -1); msg = g_strdup_printf(_("You have parted the channel%s%s"), - (args[1] && *args[1]) ? ": " : "", - (escaped && *escaped) ? escaped : ""); + (args[1] && *args[1]) ? ": " : "", + (escaped && *escaped) ? escaped : ""); g_free(escaped); purple_conv_chat_write(PURPLE_CONV_CHAT(convo), channel, msg, PURPLE_MESSAGE_SYSTEM, time(NULL)); g_free(msg); @@ -1168,7 +1168,7 @@ serv_got_chat_in(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); else purple_debug_error("irc", "Got a %s on %s, which does not exist\n", - notice ? "NOTICE" : "PRIVMSG", to); + notice ? "NOTICE" : "PRIVMSG", to); } g_free(msg); g_free(nick);
--- a/libpurple/protocols/irc/parse.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/irc/parse.c Sun Nov 23 21:57:52 2008 +0000 @@ -494,7 +494,7 @@ } } result[j] = '\0'; - return result; + return result; } const char *irc_nick_skip_mode(struct irc_conn *irc, const char *nick) @@ -732,9 +732,9 @@ static void irc_parse_error_cb(struct irc_conn *irc, char *input) { char *clean; - /* This really should be escaped somehow that you can tell what - * the junk was -- but as it is, it can crash glib. */ - clean = purple_utf8_salvage(input); + /* This really should be escaped somehow that you can tell what + * the junk was -- but as it is, it can crash glib. */ + clean = purple_utf8_salvage(input); purple_debug(PURPLE_DEBUG_WARNING, "irc", "Unrecognized string: %s\n", clean); - g_free(clean); + g_free(clean); }
--- a/libpurple/protocols/msn/notification.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Nov 23 21:57:52 2008 +0000 @@ -491,7 +491,7 @@ * command and we are processing it */ if (cmd->payload == NULL) { cmdproc->last_cmd->payload_cb = msg_cmd_post; - cmd->payload_len = atoi(cmd->params[3]); + cmd->payload_len = atoi(cmd->params[4]); } else { g_return_if_fail(cmd->payload_cb != NULL); @@ -1578,7 +1578,7 @@ MsnUser *user; const char *passport; char *psm_str, *str; - CurrentMedia media = {CURRENT_MEDIA_UNKNOWN, NULL, NULL, NULL}; + CurrentMedia media = {NULL, NULL, NULL}; session = cmdproc->session; account = session->account;
--- a/libpurple/protocols/msn/switchboard.c Sun Nov 23 20:17:05 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.c Sun Nov 23 21:57:52 2008 +0000 @@ -577,7 +577,6 @@ MsnTransaction *trans; char *payload; gsize payload_len; - char flag; g_return_if_fail(swboard != NULL); g_return_if_fail(msg != NULL); @@ -591,35 +590,32 @@ msn_message_show_readable(msg, "SB SEND", FALSE); #endif - flag = msn_message_get_flag(msg); trans = msn_transaction_new(cmdproc, "MSG", "%c %" G_GSIZE_FORMAT, - flag, payload_len); + msn_message_get_flag(msg), payload_len); /* Data for callbacks */ msn_transaction_set_data(trans, msg); - if (flag != 'U') { - if (msg->type == MSN_MSG_TEXT) - { - msg->ack_ref = TRUE; - msn_message_ref(msg); - swboard->ack_list = g_list_append(swboard->ack_list, msg); - msn_transaction_set_timeout_cb(trans, msg_timeout); - } - else if (msg->type == MSN_MSG_SLP) + if (msg->type == MSN_MSG_TEXT) + { + msg->ack_ref = TRUE; + msn_message_ref(msg); + swboard->ack_list = g_list_append(swboard->ack_list, msg); + msn_transaction_set_timeout_cb(trans, msg_timeout); + } + else if (msg->type == MSN_MSG_SLP) + { + msg->ack_ref = TRUE; + msn_message_ref(msg); + swboard->ack_list = g_list_append(swboard->ack_list, msg); + msn_transaction_set_timeout_cb(trans, msg_timeout); +#if 0 + if (msg->ack_cb != NULL) { - msg->ack_ref = TRUE; - msn_message_ref(msg); - swboard->ack_list = g_list_append(swboard->ack_list, msg); - msn_transaction_set_timeout_cb(trans, msg_timeout); -#if 0 - if (msg->ack_cb != NULL) - { - msn_transaction_add_cb(trans, "ACK", msg_ack); - msn_transaction_add_cb(trans, "NAK", msg_nak); - } + msn_transaction_add_cb(trans, "ACK", msg_ack); + msn_transaction_add_cb(trans, "NAK", msg_nak); + } #endif - } } trans->payload = payload; @@ -810,7 +806,7 @@ ubm_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { purple_debug_misc("msn", "get UBM...\n"); - cmd->payload_len = atoi(cmd->params[3]); + cmd->payload_len = atoi(cmd->params[4]); cmdproc->last_cmd->payload_cb = msg_cmd_post; }