/pidgin/main: e3e608e00598: Merge.
Andrew Victor
andrew.victor at mxit.com
Sat Jan 26 05:46:34 EST 2013
Changeset: e3e608e0059840e464adbe1d848bcbaab0fd4dec
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2013-01-26 12:46 +0200
Branch: mxit-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/e3e608e00598
Description:
Merge.
diffstat:
ChangeLog | 6 +-
Makefile.mingw | 4 +-
libpurple/imgstore.c | 38 +++--
libpurple/imgstore.h | 84 ++++++++-----
libpurple/plugins/ssl/Makefile.mingw | 1 -
libpurple/plugins/ssl/ssl-nss.c | 10 -
libpurple/protocols/bonjour/bonjour_ft.c | 166 +++++++++++++++++++++++---
libpurple/protocols/bonjour/bonjour_ft.h | 2 +
libpurple/win32/global.mak | 2 +-
pidgin/win32/gtkwin32dep.c | 15 +-
pidgin/win32/nsis/pidgin-installer.nsi | 1 -
share/ca-certs/Baltimore_CyberTrust_Root.pem | 21 +++
share/ca-certs/Makefile.am | 1 +
13 files changed, 258 insertions(+), 93 deletions(-)
diffs (truncated from 719 to 300 lines):
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,11 +12,11 @@ version 2.10.7:
libpurple:
* Don't link directly to libgcrypt when building with GnuTLS support.
(Bartosz Brachaczek) (#15329)
- * Fix UPNP mappings on routers that return empty <URLBase/> elements
+ * Fix UPnP mappings on routers that return empty <URLBase/> elements
in their response. (Ferdinand Stehle) (#15373)
* Tcl plugin uses saner, race-free plugin loading.
* Fix the Tcl signals-test plugin for savedstatus-changed.
- (Andrew Shadura) (#15443)
+ (Andrew Shadura) (#15443)
Pidgin:
* Make Pidgin more friendly to non-X11 GTK+, such as MacPorts' +no_x11
@@ -32,6 +32,7 @@ version 2.10.7:
* Print topic setter information at channel join. (#13317)
MSN:
+ * Fix SSL certificate issue when signing into MSN for some users.
* Fix a crash when removing a user before its icon is loaded. (Mark
Barfield) (#15217)
@@ -45,6 +46,7 @@ version 2.10.7:
still have a pending invite.
* The buddy's name was not centered vertically in the buddy-list if they
did not have a status-message or mood set.
+ * Fix decoding of font-size changes in the markup of received messages.
Yahoo!:
* Fix a double-free in profile/picture loading code. (Mihai Serban)
diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -45,6 +45,7 @@ gpg_sign = $(GPG_SIGN) -ab $(1) && $(GPG
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"
# 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
@@ -67,7 +68,6 @@ EXTERNAL_DLLS = \
libssp-0.dll \
libxml2-2.dll \
nss3.dll \
- nssckbi.dll \
nssutil3.dll \
saslANONYMOUS.dll \
saslCRAMMD5.dll \
@@ -108,7 +108,7 @@ endif
cp $(GTKSPELL_TOP)/bin/libgtkspell-0.dll $(PIDGIN_INSTALL_DIR)/spellcheck
cp $(ENCHANT_TOP)/bin/libenchant.dll $(PIDGIN_INSTALL_DIR)/spellcheck
cp -R $(ENCHANT_TOP)/lib/enchant/*.dll $(PIDGIN_INSTALL_DIR)/spellcheck/lib/enchant
- cp $(WIN32_DEV_TOP)/pidgin-inst-deps-20100315/exchndl.dll $(PIDGIN_INSTALL_DIR)
+ cp $(PIDGIN_INST_DEP_DIR)/exchndl.dll $(PIDGIN_INSTALL_DIR)
cp $(GCC_SSP_TOP)/bin/libssp-0.dll $(PIDGIN_INSTALL_DIR)
gtk_runtime_zip:
diff --git a/libpurple/imgstore.c b/libpurple/imgstore.c
--- a/libpurple/imgstore.c
+++ b/libpurple/imgstore.c
@@ -43,9 +43,9 @@ struct _PurpleStoredImage
{
int id;
guint8 refcount;
- size_t size; /**< The image data's size. */
- char *filename; /**< The filename (for the UI) */
- gpointer data; /**< The image data. */
+ size_t size; /**< The image data's size. */
+ char *filename; /**< The filename (for the UI) */
+ gpointer data; /**< The image data. */
};
PurpleStoredImage *
@@ -89,23 +89,26 @@ int
purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename)
{
PurpleStoredImage *img = purple_imgstore_add(data, size, filename);
- if (img) {
- /*
- * Use the next unused id number. We do it in a loop on the
- * off chance that nextid wraps back around to 0 and the hash
- * table still contains entries from the first time around.
- */
- do {
- img->id = ++nextid;
- } while (img->id == 0 || g_hash_table_lookup(imgstore, &(img->id)) != NULL);
-
- g_hash_table_insert(imgstore, &(img->id), img);
+ if (!img) {
+ return 0;
}
- return (img ? img->id : 0);
+ /*
+ * Use the next unused id number. We do it in a loop on the
+ * off chance that nextid wraps back around to 0 and the hash
+ * table still contains entries from the first time around.
+ */
+ do {
+ img->id = ++nextid;
+ } while (img->id == 0 || g_hash_table_lookup(imgstore, &(img->id)) != NULL);
+
+ g_hash_table_insert(imgstore, &(img->id), img);
+
+ return img->id;
}
-PurpleStoredImage *purple_imgstore_find_by_id(int id) {
+PurpleStoredImage *purple_imgstore_find_by_id(int id)
+{
PurpleStoredImage *img = g_hash_table_lookup(imgstore, &id);
if (img != NULL)
@@ -114,7 +117,8 @@ PurpleStoredImage *purple_imgstore_find_
return img;
}
-gconstpointer purple_imgstore_get_data(PurpleStoredImage *img) {
+gconstpointer purple_imgstore_get_data(PurpleStoredImage *img)
+{
g_return_val_if_fail(img != NULL, NULL);
return img->data;
diff --git a/libpurple/imgstore.h b/libpurple/imgstore.h
--- a/libpurple/imgstore.h
+++ b/libpurple/imgstore.h
@@ -29,8 +29,10 @@
#include <glib.h>
-/** A reference-counted immutable wrapper around an image's data and its
- * filename.
+/**
+ * A set of utility functions that provide a reference-counted immutable
+ * wrapper around an image's data and filename. These functions do not
+ * cache any data to disk.
*/
typedef struct _PurpleStoredImage PurpleStoredImage;
@@ -39,59 +41,73 @@ extern "C" {
#endif
/**
- * Add an image to the store.
+ * Create a new PurpleStoredImage.
*
- * The caller owns a reference to the image in the store, and must dereference
- * the image with purple_imgstore_unref() for it to be freed.
+ * Despite the name of this function, the image is NOT added to the image
+ * store and no ID is assigned. If you need to reference the image by an
+ * ID, use purple_imgstore_add_with_id() instead.
*
- * No ID is allocated when using this function. If you need to reference the
- * image by an ID, use purple_imgstore_add_with_id() instead.
+ * The caller owns a reference to this image and must dereference it with
+ * purple_imgstore_unref() for it to be freed.
*
- * @param data Pointer to the image data, which the imgstore will take
- * ownership of and free as appropriate. If you want a
- * copy of the data, make it before calling this function.
- * @param size Image data's size.
- * @param filename Filename associated with image. This is for your
+ * @param data Pointer to the image data, which the imgstore will take
+ * ownership of and free as appropriate. If you want a
+ * copy of the data, make it before calling this function.
+ * @param size Image data's size.
+ * @param filename Filename associated with image. This is for your
* convenience. It could be the full path to the
* image or, more commonly, the filename of the image
* without any directory information. It can also be
* NULL, if you don't need to keep track of a filename.
*
- * @return The stored image.
+ * @return The stored image, or NULL if the image was not added (because of
+ * empty data or size).
*/
PurpleStoredImage *
purple_imgstore_add(gpointer data, size_t size, const char *filename);
/**
- * Create an image and add it to the store.
+ * Create a PurpleStoredImage using purple_imgstore_add() by reading the
+ * given filename from disk.
+ *
+ * The image is not added to the image store and no ID is assigned. If you
+ * need to reference the image by an ID, use purple_imgstore_add_with_id()
+ * instead.
+ *
+ * The caller owns a reference to this image and must dereference it with
+ * purple_imgstore_unref() for it to be freed.
*
* @param path The path to the image.
*
- * @return The stored image.
- * @since 2.X.X
+ * @return The stored image, or NULL if the image was not added (because of
+ * empty data or size).
+ *
+ * @since 2.5.0
*/
PurpleStoredImage *
purple_imgstore_new_from_file(const char *path);
/**
- * Add an image to the store, allocating an ID.
+ * Create a PurpleStoredImage using purple_imgstore_add() and add the
+ * image to the image store. A unique ID will be assigned to the image.
*
- * The caller owns a reference to the image in the store, and must dereference
- * the image with purple_imgstore_unref_by_id() or purple_imgstore_unref()
- * for it to be freed.
+ * The caller owns a reference to the image and must dereference it with
+ * purple_imgstore_unref() or purple_imgstore_unref_by_id() for it to be
+ * freed.
*
- * @param data Pointer to the image data, which the imgstore will take
- * ownership of and free as appropriate. If you want a
- * copy of the data, make it before calling this function.
- * @param size Image data's size.
- * @param filename Filename associated with image. This is for your
+ * @param data Pointer to the image data, which the imgstore will take
+ * ownership of and free as appropriate. If you want a
+ * copy of the data, make it before calling this function.
+ * @param size Image data's size.
+ * @param filename Filename associated with image. This is for your
* convenience. It could be the full path to the
* image or, more commonly, the filename of the image
* without any directory information. It can also be
* NULL, if you don't need to keep track of a filename.
-
+ *
* @return ID for the image. This is a unique number that can be used
- * within libpurple to reference the image.
+ * within libpurple to reference the image. 0 is returned if the
+ * image was not added (because of empty data or size).
*/
int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename);
@@ -99,7 +115,7 @@ int purple_imgstore_add_with_id(gpointer
* Retrieve an image from the store. The caller does not own a
* reference to the image.
*
- * @param id The ID for the image.
+ * @param id The ID for the image.
*
* @return A pointer to the requested image, or NULL if it was not found.
*/
@@ -108,7 +124,7 @@ PurpleStoredImage *purple_imgstore_find_
/**
* Retrieves a pointer to the image's data.
*
- * @param img The Image
+ * @param img The Image.
*
* @return A pointer to the data, which must not
* be freed or modified.
@@ -118,7 +134,7 @@ gconstpointer purple_imgstore_get_data(P
/**
* Retrieves the length of the image's data.
*
- * @param img The Image
+ * @param img The Image.
*
* @return The size of the data that the pointer returned by
* purple_imgstore_get_data points to.
@@ -128,7 +144,7 @@ size_t purple_imgstore_get_size(PurpleSt
/**
* Retrieves a pointer to the image's filename.
*
- * @param img The image
+ * @param img The image.
*
* @return A pointer to the filename, which must not
* be freed or modified.
@@ -139,7 +155,7 @@ const char *purple_imgstore_get_filename
* Looks at the magic numbers of the image data (the first few bytes)
* and returns an extension corresponding to the image's file type.
*
- * @param img The image.
+ * @param img The image.
*
* @return The image's extension (for example "png") or "icon"
* if unknown.
@@ -175,7 +191,7 @@ purple_imgstore_unref(PurpleStoredImage
* purple_imgstore_ref(), so if you have a PurpleStoredImage, it'll
* be more efficient to call purple_imgstore_ref() directly.
*
- * @param id The ID for the image.
+ * @param id The ID for the image.
*/
void purple_imgstore_ref_by_id(int id);
@@ -186,7 +202,7 @@ void purple_imgstore_ref_by_id(int id);
* purple_imgstore_unref(), so if you have a PurpleStoredImage, it'll
* be more efficient to call purple_imgstore_unref() directly.
*
More information about the Commits
mailing list