/pidgin/main: 370638c6fddd: Minor manual merge from the release-...

Mark Doliner mark at kingant.net
Mon Jan 21 22:47:11 EST 2013


Changeset: 370638c6fdddb8721bccac8bbdd632e1db7e7a0e
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-01-21 19:47 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/370638c6fddd

Description:

Minor manual merge from the release-2.x.y branch.

diffstat:

 ChangeLog            |   5 +++--
 libpurple/imgstore.c |  38 +++++++++++++++++++++-----------------
 2 files changed, 24 insertions(+), 19 deletions(-)

diffs (91 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,11 +68,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
@@ -88,6 +88,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)
 
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;



More information about the Commits mailing list