# HG changeset patch # User Sean Egan # Date 1170464347 0 # Node ID 4ead39213173dc2e3a6172229226eae70460127a # Parent 0d48906372387980b3775f6d175bf470cfee4358# Parent 74efe677c8a58b89b863428c26224e5ffb4508ae merge of '09ff3dbbbf318127fa55c593466b381a9f4114b3' and '8af2491f942d81c6a2b3518ae58fd9395900a0b3' diff -r 74efe677c8a5 -r 4ead39213173 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sat Feb 03 00:59:00 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat Feb 03 00:59:07 2007 +0000 @@ -1074,7 +1074,8 @@ JabberBuddy *jb = NULL; if(!b->account->gc) - return; + return NULL; + js = b->account->gc->proto_data; if(js) jb = jabber_buddy_find(js, b->name, FALSE); diff -r 74efe677c8a5 -r 4ead39213173 libpurple/protocols/jabber/parser.c --- a/libpurple/protocols/jabber/parser.c Sat Feb 03 00:59:00 2007 +0000 +++ b/libpurple/protocols/jabber/parser.c Sat Feb 03 00:59:07 2007 +0000 @@ -79,7 +79,7 @@ char *attrib_ns = NULL; if (attributes[i+2]) { - attrib_ns = g_strdup(attributes[i+2]);; + attrib_ns = g_strdup((char*)attributes[i+2]);; } memcpy(attrib, attributes[i+3], attrib_len); diff -r 74efe677c8a5 -r 4ead39213173 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sat Feb 03 00:59:00 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Feb 03 00:59:07 2007 +0000 @@ -2811,7 +2811,7 @@ if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) || !(yd = gc->proto_data)) - return; + return NULL; f = yahoo_friend_find(gc, b->name); if (!f) { diff -r 74efe677c8a5 -r 4ead39213173 libpurple/proxy.c --- a/libpurple/proxy.c Sat Feb 03 00:59:00 2007 +0000 +++ b/libpurple/proxy.c Sat Feb 03 00:59:07 2007 +0000 @@ -597,7 +597,7 @@ { int major; p = connect_data->read_buffer + 5; - major = strtol((const char *)p, (char **)&p, 10); + major = strtol((const char *)p, (char**)&p, 10); error = (major == 0) || (*p != '.'); if(!error) { int minor; diff -r 74efe677c8a5 -r 4ead39213173 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Feb 03 00:59:00 2007 +0000 +++ b/pidgin/gtkconv.c Sat Feb 03 00:59:07 2007 +0000 @@ -4876,22 +4876,21 @@ g_free(displaying); return; } - message = displaying; - length = strlen(message) + 1; + length = strlen(displaying) + 1; /* Awful hack to work around GtkIMHtml's inefficient rendering of messages with lots of formatting changes. * If a message has over 100 '<' characters, strip formatting before appending it. Hopefully nobody actually * needs that much formatting, anyway. */ - for (bracket = strchr(message, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<')) + for (bracket = strchr(displaying, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<')) tag_count++; - + if (tag_count > 100) { - char *tmp = message; - message = displaying = gaim_markup_strip_html(message); + char *tmp = displaying; + displaying = gaim_markup_strip_html(tmp); g_free(tmp); - } - + } + win = gtkconv->win; prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); @@ -4964,27 +4963,27 @@ if (flags & GAIM_MESSAGE_SYSTEM) { g_snprintf(buf2, sizeof(buf2), "%s", - sml_attrib ? sml_attrib : "", mdate, message); + sml_attrib ? sml_attrib : "", mdate, displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_ERROR) { g_snprintf(buf2, sizeof(buf2), "%s", - sml_attrib ? sml_attrib : "", mdate, message); + sml_attrib ? sml_attrib : "", mdate, displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_NO_LOG) { g_snprintf(buf2, BUF_LONG, "%s", - sml_attrib ? sml_attrib : "", message); + sml_attrib ? sml_attrib : "", displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_RAW) { - gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all); + gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), displaying, gtk_font_options_all); } else { - char *new_message = g_memdup(message, length); + char *new_message = g_memdup(displaying, length); char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup("")); /* The initial offset is to deal with * escaped entities making the string longer */ @@ -5180,7 +5179,7 @@ gaim_signal_emit(gaim_gtk_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), - account, name, message, conv, flags); + account, name, displaying, conv, flags); g_free(displaying); } static void