/pidgin/main: 5e1a2b90561c: Merge with no conflicts

Mark Doliner mark at kingant.net
Tue Feb 19 00:47:34 EST 2013


Changeset: 5e1a2b90561cb6b84935dc946ccbc37edf181ef4
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-02-18 21:44 -0800
Branch:	 release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/5e1a2b90561c

Description:

Merge with no conflicts

diffstat:

 Makefile.mingw                            |   6 +++---
 libpurple/buddyicon.c                     |   2 +-
 libpurple/certificate.c                   |   4 ++--
 libpurple/log.c                           |   2 +-
 libpurple/plugin.c                        |   7 ++-----
 libpurple/plugins/tcl/tcl.c               |   4 ++--
 libpurple/protocols/jabber/bosh.c         |   6 ++----
 libpurple/protocols/jabber/useravatar.c   |   8 ++++++--
 libpurple/protocols/msn/msn.c             |   2 +-
 libpurple/protocols/oscar/family_icbm.c   |   2 +-
 libpurple/protocols/oscar/family_locate.c |   2 +-
 libpurple/protocols/silc/ft.c             |   2 --
 libpurple/protocols/silc/wb.c             |   2 +-
 libpurple/protocols/silc10/wb.c           |   2 +-
 libpurple/protocols/yahoo/yahoo_profile.c |   2 +-
 libpurple/theme-loader.c                  |   1 +
 libpurple/upnp.c                          |   2 --
 libpurple/win32/global.mak                |   2 +-
 pidgin/gtkconv.c                          |   2 +-
 pidgin/gtkimhtml.c                        |   7 ++++---
 pidgin/plugins/cap/cap.c                  |   2 +-
 pidgin/win32/nsis/pidgin-installer.nsi    |  11 +++++++----
 22 files changed, 40 insertions(+), 40 deletions(-)

diffs (truncated from 360 to 300 lines):

diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -38,14 +38,14 @@ authenticode_sign = $(MONO_SIGNCODE) \
 		    -a sha1 -$$ commercial \
 		    -n "$(2)" -i "https://pidgin.im" \
 		    -t "http://timestamp.verisign.com/scripts/timstamp.dll" -tr 10 \
-		    $(1)
+		    $(1) && rm -f $(1).bak
 
 gpg_sign = $(GPG_SIGN) -ab $(1) && $(GPG_SIGN) --verify $(1).asc
 
 STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin
 DEBUG_SYMBOLS_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-dbgsym
 
-PIDGIN_INST_DEP_DIR="$(WIN32_DEV_TOP)/pidgin-inst-deps-20120910"
+PIDGIN_INST_DEP_DIR="$(WIN32_DEV_TOP)/pidgin-inst-deps-20130214"
 
 # Any *.dll or *.exe files included in win32-install-dir that we don't compile
 # should be included in this list so they don't get stripped
@@ -109,7 +109,7 @@ endif
 	cp $(ENCHANT_TOP)/bin/libenchant.dll $(PIDGIN_INSTALL_DIR)/spellcheck
 	cp -R $(ENCHANT_TOP)/lib/enchant/*.dll $(PIDGIN_INSTALL_DIR)/spellcheck/lib/enchant
 	cp $(PIDGIN_INST_DEP_DIR)/exchndl.dll $(PIDGIN_INSTALL_DIR)
-	cp $(GCC_SSP_TOP)/bin/libssp-0.dll $(PIDGIN_INSTALL_DIR)
+	cp $(GCC_SSP_TOP)/libssp-0.dll $(PIDGIN_INSTALL_DIR)
 
 gtk_runtime_zip:
 	pidgin/win32/nsis/generate_gtk_zip.sh "`pwd`" "$(GPG_SIGN)"
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -407,7 +407,7 @@ purple_buddy_icon_update(PurpleBuddyIcon
 	icon_to_set = icon->img ? icon : NULL;
 
 	/* Ensure that icon remains valid throughout */
-	if (icon) purple_buddy_icon_ref(icon);
+	purple_buddy_icon_ref(icon);
 
 	buddies = purple_find_buddies(account, username);
 	while (buddies != NULL)
diff --git a/libpurple/certificate.c b/libpurple/certificate.c
--- a/libpurple/certificate.c
+++ b/libpurple/certificate.c
@@ -516,8 +516,8 @@ purple_certificate_pool_mkpath(PurpleCer
 	g_return_val_if_fail(pool->name, NULL);
 
 	/* Escape all the elements for filesystem-friendliness */
-	esc_scheme_name = pool ? g_strdup(purple_escape_filename(pool->scheme_name)) : NULL;
-	esc_name = pool ? g_strdup(purple_escape_filename(pool->name)) : NULL;
+	esc_scheme_name = g_strdup(purple_escape_filename(pool->scheme_name));
+	esc_name = g_strdup(purple_escape_filename(pool->name));
 	esc_id = id ? g_strdup(purple_escape_filename(id)) : NULL;
 
 	path = g_build_filename(purple_user_dir(),
diff --git a/libpurple/log.c b/libpurple/log.c
--- a/libpurple/log.c
+++ b/libpurple/log.c
@@ -1146,7 +1146,7 @@ static void log_get_log_sets_common(GHas
 				}
 
 				/* Determine if this (account, name) combination exists as a buddy. */
-				if (account != NULL && name != NULL && *name != '\0')
+				if (account != NULL && *name != '\0')
 					set->buddy = (purple_find_buddy(account, name) != NULL);
 				else
 					set->buddy = FALSE;
diff --git a/libpurple/plugin.c b/libpurple/plugin.c
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -587,11 +587,8 @@ purple_plugin_load(PurplePlugin *plugin)
 
 	if (plugin->native_plugin)
 	{
-		if (plugin->info != NULL && plugin->info->load != NULL)
-		{
-			if (!plugin->info->load(plugin))
-				return FALSE;
-		}
+		if (plugin->info->load != NULL && !plugin->info->load(plugin))
+			return FALSE;
 	}
 	else {
 		PurplePlugin *loader;
diff --git a/libpurple/plugins/tcl/tcl.c b/libpurple/plugins/tcl/tcl.c
--- a/libpurple/plugins/tcl/tcl.c
+++ b/libpurple/plugins/tcl/tcl.c
@@ -422,8 +422,8 @@ static PurplePluginInfo tcl_info =
 };
 
 #ifdef _WIN32
-typedef Tcl_Interp* (CALLBACK* LPFNTCLCREATEINTERP)(void);
-typedef void        (CALLBACK* LPFNTKINIT)(Tcl_Interp*);
+typedef Tcl_Interp* (__cdecl* LPFNTCLCREATEINTERP)(void);
+typedef void        (__cdecl* LPFNTKINIT)(Tcl_Interp*);
 
 LPFNTCLCREATEINTERP wtcl_CreateInterp = NULL;
 LPFNTKINIT wtk_Init = NULL;
diff --git a/libpurple/protocols/jabber/bosh.c b/libpurple/protocols/jabber/bosh.c
--- a/libpurple/protocols/jabber/bosh.c
+++ b/libpurple/protocols/jabber/bosh.c
@@ -348,10 +348,8 @@ jabber_bosh_connection_send(PurpleBOSHCo
 		 * sent immediately), queue up the data and start a timer to flush
 		 * the buffer.
 		 */
-		if (data) {
-			int len = data ? strlen(data) : 0;
-			purple_circ_buffer_append(conn->pending, data, len);
-		}
+		if (data)
+			purple_circ_buffer_append(conn->pending, data, strlen(data));
 
 		if (purple_debug_is_verbose())
 			purple_debug_misc("jabber", "bosh: %p has %" G_GSIZE_FORMAT " bytes in "
diff --git a/libpurple/protocols/jabber/useravatar.c b/libpurple/protocols/jabber/useravatar.c
--- a/libpurple/protocols/jabber/useravatar.c
+++ b/libpurple/protocols/jabber/useravatar.c
@@ -113,6 +113,7 @@ void jabber_avatar_set(JabberStream *js,
 		 *       and width.
 		 */
 		/* A PNG header, including the IHDR, but nothing else */
+		/* ATTN: this is in network byte order! */
 		const struct {
 			guchar signature[8]; /* must be hex 89 50 4E 47 0D 0A 1A 0A */
 			struct {
@@ -126,10 +127,13 @@ void jabber_avatar_set(JabberStream *js,
 				guchar filter;
 				guchar interlace;
 			} ihdr;
-		} *png = purple_imgstore_get_data(img); /* ATTN: this is in network byte order! */
+		} *png = NULL;
+
+		if (purple_imgstore_get_size(img) > sizeof(*png))
+			png = purple_imgstore_get_data(img);
 
 		/* check if the data is a valid png file (well, at least to some extent) */
-		if(png->signature[0] == 0x89 &&
+		if(png && png->signature[0] == 0x89 &&
 		   png->signature[1] == 0x50 &&
 		   png->signature[2] == 0x4e &&
 		   png->signature[3] == 0x47 &&
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -2764,7 +2764,7 @@ msn_got_photo(PurpleUtilFetchUrlData *ur
 	}
 
 	/* Try to put the photo in there too, if there's one and is readable */
-	if (user_data && url_text && len != 0)
+	if (url_text && len != 0)
 	{
 		if (strstr(url_text, "400 Bad Request")
 			|| strstr(url_text, "403 Forbidden")
diff --git a/libpurple/protocols/oscar/family_icbm.c b/libpurple/protocols/oscar/family_icbm.c
--- a/libpurple/protocols/oscar/family_icbm.c
+++ b/libpurple/protocols/oscar/family_icbm.c
@@ -156,7 +156,7 @@ error(OscarData *od, FlapConnection *con
 
 	purple_debug_error("oscar",
 			   "Message error with bn %s and reason %hu and errcode %hu\n",
-				(bn != NULL ? bn : ""), reason, errcode);
+				bn, reason, errcode);
 
 #ifdef TODOFT
 	/* If this was a file transfer request, bn is a cookie */
diff --git a/libpurple/protocols/oscar/family_locate.c b/libpurple/protocols/oscar/family_locate.c
--- a/libpurple/protocols/oscar/family_locate.c
+++ b/libpurple/protocols/oscar/family_locate.c
@@ -1355,7 +1355,7 @@ aim_locate_setcaps(OscarData *od, guint6
 	aim_snacid_t snacid;
 	GSList *tlvlist = NULL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)))
+	if (!(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)))
 		return -EINVAL;
 
 	aim_tlvlist_add_caps(&tlvlist, 0x0005, caps, mood);
diff --git a/libpurple/protocols/silc/ft.c b/libpurple/protocols/silc/ft.c
--- a/libpurple/protocols/silc/ft.c
+++ b/libpurple/protocols/silc/ft.c
@@ -222,8 +222,6 @@ silcpurple_ftp_request_result(PurpleXfer
 
 	if (purple_xfer_get_status(x) != PURPLE_XFER_STATUS_ACCEPTED)
 		return;
-	if (!xfer)
-		return;
 
 	silc_socket_stream_get_info(silc_packet_stream_get_stream(xfer->sg->conn->stream),
 				    &sock, NULL, NULL, NULL);
diff --git a/libpurple/protocols/silc/wb.c b/libpurple/protocols/silc/wb.c
--- a/libpurple/protocols/silc/wb.c
+++ b/libpurple/protocols/silc/wb.c
@@ -192,7 +192,7 @@ silcpurple_wb_parse(SilcPurpleWb wbs, Pu
 
 	/* Update whiteboard if its dimensions changed */
 	if (width != wbs->width || height != wbs->height)
-		silcpurple_wb_set_dimensions(wb, height, width);
+		silcpurple_wb_set_dimensions(wb, width, height);
 
 	if (command == SILCPURPLE_WB_DRAW) {
 		/* Parse data and draw it */
diff --git a/libpurple/protocols/silc10/wb.c b/libpurple/protocols/silc10/wb.c
--- a/libpurple/protocols/silc10/wb.c
+++ b/libpurple/protocols/silc10/wb.c
@@ -191,7 +191,7 @@ silcpurple_wb_parse(SilcPurpleWb wbs, Pu
 
 	/* Update whiteboard if its dimensions changed */
 	if (width != wbs->width || height != wbs->height)
-		silcpurple_wb_set_dimensions(wb, height, width);
+		silcpurple_wb_set_dimensions(wb, width, height);
 
 	if (command == SILCPURPLE_WB_DRAW) {
 		/* Parse data and draw it */
diff --git a/libpurple/protocols/yahoo/yahoo_profile.c b/libpurple/protocols/yahoo/yahoo_profile.c
--- a/libpurple/protocols/yahoo/yahoo_profile.c
+++ b/libpurple/protocols/yahoo/yahoo_profile.c
@@ -1035,7 +1035,7 @@ yahoo_got_photo(PurpleUtilFetchUrlData *
 
 #if PHOTO_SUPPORT
 	/* Try to put the photo in there too, if there's one and is readable */
-	if (data && url_text && len != 0) {
+	if (url_text && len != 0) {
 		if (strstr(url_text, "400 Bad Request")
 				|| strstr(url_text, "403 Forbidden")
 				|| strstr(url_text, "404 Not Found")) {
diff --git a/libpurple/theme-loader.c b/libpurple/theme-loader.c
--- a/libpurple/theme-loader.c
+++ b/libpurple/theme-loader.c
@@ -63,6 +63,7 @@ purple_theme_loader_get_property(GObject
 	switch (param_id) {
 		case PROP_TYPE:
 			g_value_set_string(value, purple_theme_loader_get_type_string(theme_loader));
+			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, psec);
 			break;
diff --git a/libpurple/upnp.c b/libpurple/upnp.c
--- a/libpurple/upnp.c
+++ b/libpurple/upnp.c
@@ -746,7 +746,6 @@ const gchar *
 purple_upnp_get_public_ip()
 {
 	if (control_info.status == PURPLE_UPNP_STATUS_DISCOVERED
-			&& control_info.publicip
 			&& strlen(control_info.publicip) > 0)
 		return control_info.publicip;
 
@@ -805,7 +804,6 @@ static const gchar *
 purple_upnp_get_internal_ip(void)
 {
 	if (control_info.status == PURPLE_UPNP_STATUS_DISCOVERED
-			&& control_info.internalip
 			&& strlen(control_info.internalip) > 0)
 		return control_info.internalip;
 
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -22,7 +22,7 @@ PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.
 SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.10
 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
 GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13
-GCC_SSP_TOP ?= $(WIN32_DEV_TOP)/gcc-core-4.4.0-mingw32-dll
+GCC_SSP_TOP ?= $(shell dirname $(shell which $(CC)))
 CYRUS_SASL_TOP ?= $(WIN32_DEV_TOP)/cyrus-sasl-2.1.25
 
 # Where we installing this stuff to?
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -6546,7 +6546,7 @@ gray_stuff_out(PidginConversation *gtkco
 			gtk_widget_show(win->menu.unblock);
 		}
 
-		if ((account == NULL) || purple_find_buddy(account, purple_conversation_get_name(conv)) == NULL) {
+		if (purple_find_buddy(account, purple_conversation_get_name(conv)) == NULL) {
 			gtk_widget_show(win->menu.add);
 			gtk_widget_hide(win->menu.remove);
 		} else {
diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c
--- a/pidgin/gtkimhtml.c
+++ b/pidgin/gtkimhtml.c
@@ -2353,10 +2353,11 @@ gtk_imhtml_is_tag (const gchar *string,
 	if (!g_ascii_strncasecmp(string, "!--", strlen ("!--"))) {
 		gchar *e = strstr (string + strlen("!--"), "-->");
 		if (e) {
-			if (len)
+			if (len) {
 				*len = e - string + strlen ("-->");
-			if (tag)
-				*tag = g_strndup (string + strlen ("!--"), *len - strlen ("!---->"));
+				if (tag)
+					*tag = g_strndup (string + strlen ("!--"), *len - strlen ("!---->"));
+			}
 			return TRUE;
 		}
 	}
diff --git a/pidgin/plugins/cap/cap.c b/pidgin/plugins/cap/cap.c
--- a/pidgin/plugins/cap/cap.c
+++ b/pidgin/plugins/cap/cap.c



More information about the Commits mailing list