pidgin/android/libpurple

Merge with no conflicts
release-2.x.y
2013-02-18, Mark Doliner
5e1a2b90561c
Merge with no conflicts
--- a/Makefile.mingw Mon Feb 18 21:37:00 2013 -0800
+++ b/Makefile.mingw Mon Feb 18 21:44:40 2013 -0800
@@ -38,14 +38,14 @@
-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 @@
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)"
--- a/libpurple/buddyicon.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/buddyicon.c Mon Feb 18 21:44:40 2013 -0800
@@ -407,7 +407,7 @@
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)
--- a/libpurple/certificate.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/certificate.c Mon Feb 18 21:44:40 2013 -0800
@@ -516,8 +516,8 @@
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(),
--- a/libpurple/log.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/log.c Mon Feb 18 21:44:40 2013 -0800
@@ -1146,7 +1146,7 @@
}
/* 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;
--- a/libpurple/plugin.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/plugin.c Mon Feb 18 21:44:40 2013 -0800
@@ -587,11 +587,8 @@
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;
--- a/libpurple/plugins/tcl/tcl.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/plugins/tcl/tcl.c Mon Feb 18 21:44:40 2013 -0800
@@ -422,8 +422,8 @@
};
#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;
--- a/libpurple/protocols/jabber/bosh.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/jabber/bosh.c Mon Feb 18 21:44:40 2013 -0800
@@ -348,10 +348,8 @@
* 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 "
--- a/libpurple/protocols/jabber/useravatar.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/jabber/useravatar.c Mon Feb 18 21:44:40 2013 -0800
@@ -113,6 +113,7 @@
* 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 @@
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 &&
--- a/libpurple/protocols/msn/msn.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/msn/msn.c Mon Feb 18 21:44:40 2013 -0800
@@ -2764,7 +2764,7 @@
}
/* 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")
--- a/libpurple/protocols/oscar/family_icbm.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/oscar/family_icbm.c Mon Feb 18 21:44:40 2013 -0800
@@ -156,7 +156,7 @@
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 */
--- a/libpurple/protocols/oscar/family_locate.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/oscar/family_locate.c Mon Feb 18 21:44:40 2013 -0800
@@ -1355,7 +1355,7 @@
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);
--- a/libpurple/protocols/silc/ft.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/silc/ft.c Mon Feb 18 21:44:40 2013 -0800
@@ -222,8 +222,6 @@
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);
--- a/libpurple/protocols/silc/wb.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/silc/wb.c Mon Feb 18 21:44:40 2013 -0800
@@ -192,7 +192,7 @@
/* 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 */
--- a/libpurple/protocols/silc10/wb.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/silc10/wb.c Mon Feb 18 21:44:40 2013 -0800
@@ -191,7 +191,7 @@
/* 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 */
--- a/libpurple/protocols/yahoo/yahoo_profile.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/protocols/yahoo/yahoo_profile.c Mon Feb 18 21:44:40 2013 -0800
@@ -1035,7 +1035,7 @@
#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")) {
--- a/libpurple/theme-loader.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/theme-loader.c Mon Feb 18 21:44:40 2013 -0800
@@ -63,6 +63,7 @@
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;
--- a/libpurple/upnp.c Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/upnp.c Mon Feb 18 21:44:40 2013 -0800
@@ -746,7 +746,6 @@
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 @@
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;
--- a/libpurple/win32/global.mak Mon Feb 18 21:37:00 2013 -0800
+++ b/libpurple/win32/global.mak Mon Feb 18 21:44:40 2013 -0800
@@ -22,7 +22,7 @@
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?
--- a/pidgin/gtkconv.c Mon Feb 18 21:37:00 2013 -0800
+++ b/pidgin/gtkconv.c Mon Feb 18 21:44:40 2013 -0800
@@ -6546,7 +6546,7 @@
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 {
--- a/pidgin/gtkimhtml.c Mon Feb 18 21:37:00 2013 -0800
+++ b/pidgin/gtkimhtml.c Mon Feb 18 21:44:40 2013 -0800
@@ -2353,10 +2353,11 @@
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;
}
}
--- a/pidgin/plugins/cap/cap.c Mon Feb 18 21:37:00 2013 -0800
+++ b/pidgin/plugins/cap/cap.c Mon Feb 18 21:44:40 2013 -0800
@@ -43,7 +43,7 @@
int threshold = purple_prefs_get_int("/plugins/gtk/cap/threshold");
int min_minute = (current_minute - threshold) % 1440;
int max_minute = (current_minute + threshold) % 1440;
- char *sql, sta_id = NULL;
+ char *sql, *sta_id = NULL;
sqlite3_stmt *stmt = NULL;
const char *tail = NULL;
int rc;
--- a/pidgin/win32/nsis/pidgin-installer.nsi Mon Feb 18 21:37:00 2013 -0800
+++ b/pidgin/win32/nsis/pidgin-installer.nsi Mon Feb 18 21:44:40 2013 -0800
@@ -258,7 +258,7 @@
retry:
StrCpy $R2 "${DOWNLOADER_URL}&gtk_version=${GTK_INSTALL_VERSION}&dl_pkg=gtk"
DetailPrint "Downloading GTK+ Runtime ... ($R2)"
- NSISdl::download /TIMEOUT=10000 $R2 $R1
+ NSISdl::download /TIMEOUT=10000 "$R2" "$R1"
Pop $R0
;StrCmp $R0 "cancel" done
StrCmp $R0 "success" 0 prompt_retry
@@ -453,7 +453,7 @@
retry:
StrCpy $R2 "${DOWNLOADER_URL}&dl_pkg=dbgsym"
DetailPrint "Downloading Debug Symbols... ($R2)"
- NSISdl::download /TIMEOUT=10000 $R2 $R1
+ NSISdl::download /TIMEOUT=10000 "$R2" "$R1"
Pop $R0
StrCmp $R0 "cancel" done
StrCmp $R0 "success" 0 prompt_retry
@@ -532,6 +532,7 @@
Delete "$INSTDIR\ca-certs\AddTrust_External_Root.pem"
Delete "$INSTDIR\ca-certs\America_Online_Root_Certification_Authority_1.pem"
Delete "$INSTDIR\ca-certs\AOL_Member_CA.pem"
+ Delete "$INSTDIR\ca-certs\Baltimore_CyberTrust_Root.pem"
Delete "$INSTDIR\ca-certs\CAcert_Class3.pem"
Delete "$INSTDIR\ca-certs\CAcert_Root.pem"
Delete "$INSTDIR\ca-certs\Deutsche_Telekom_Root_CA_2.pem"
@@ -549,7 +550,7 @@
Delete "$INSTDIR\ca-certs\StartCom_Free_SSL_CA.pem"
Delete "$INSTDIR\ca-certs\Thawte_Premium_Server_CA.pem"
Delete "$INSTDIR\ca-certs\Thawte_Primary_Root_CA.pem"
- Delete "$INSTDIR\ca-certs\ValiCert_Class_2_VA.crt"
+ Delete "$INSTDIR\ca-certs\ValiCert_Class_2_VA.pem"
Delete "$INSTDIR\ca-certs\VeriSign_Class3_Extended_Validation_CA.pem"
Delete "$INSTDIR\ca-certs\Verisign_Class3_Primary_CA.pem"
Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem"
@@ -1331,9 +1332,11 @@
IntOp $R1 0 + 0
done:
+ Exch $R1 ;$R1 has the return code
+ Exch
Pop $R2
+ Exch
Pop $R0
- Exch $R1 ;$R1 has the return code
FunctionEnd
!endif