Replace misused g_str_equal() with purple_strequal() string-comparison-r2

Thu, 23 Mar 2017 19:19:01 +0300

author
qarkai <qarkai@gmail.com>
date
Thu, 23 Mar 2017 19:19:01 +0300
branch
string-comparison-r2
changeset 38256
035f00c4fd87
parent 38239
f76c1aa92c07
child 38257
1a294a6d2a57

Replace misused g_str_equal() with purple_strequal()

finch/gntaccount.c file | annotate | diff | comparison | revisions
libpurple/account.c file | annotate | diff | comparison | revisions
libpurple/blist.c file | annotate | diff | comparison | revisions
libpurple/conversation.c file | annotate | diff | comparison | revisions
libpurple/network.c file | annotate | diff | comparison | revisions
libpurple/plugins/signals-test.c file | annotate | diff | comparison | revisions
libpurple/plugins/ssl/ssl-gnutls.c file | annotate | diff | comparison | revisions
libpurple/privacy.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/auth.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/auth_cyrus.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/bosh.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/buddy.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/caps.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/disco.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/google/google_session.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/ibb.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jabber.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jingle/rtp.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jingle/session.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jutil.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/message.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/parser.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/presence.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/roster.c file | annotate | diff | comparison | revisions
libpurple/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
libpurple/tests/test_jabber_scram.c file | annotate | diff | comparison | revisions
libpurple/util.c file | annotate | diff | comparison | revisions
pidgin/gtkblist.c file | annotate | diff | comparison | revisions
pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/plugins/disco/xmppdisco.c file | annotate | diff | comparison | revisions
pidgin/plugins/timestamp_format.c file | annotate | diff | comparison | revisions
--- a/finch/gntaccount.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/finch/gntaccount.c	Thu Mar 23 19:19:01 2017 +0300
@@ -448,7 +448,7 @@
 					PurpleKeyValuePair *kvp = opt_iter->data;
 					gnt_combo_box_add_data(GNT_COMBO_BOX(combo), kvp->value, kvp->key);
 
-					if (g_str_equal(kvp->value, active))
+					if (purple_strequal(kvp->value, active))
 						gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), kvp->value);
 				}
 			}
--- a/libpurple/account.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/account.c	Thu Mar 23 19:19:01 2017 +0300
@@ -559,10 +559,10 @@
 migrate_xmpp_encryption(PurpleAccount *account)
 {
 	/* When this is removed, nuke the "old_ssl" and "require_tls" settings */
-	if (g_str_equal(purple_account_get_protocol_id(account), "prpl-jabber")) {
+	if (purple_strequal(purple_account_get_protocol_id(account), "prpl-jabber")) {
 		const char *sec = purple_account_get_string(account, "connection_security", "");
 
-		if (g_str_equal("", sec)) {
+		if (purple_strequal("", sec)) {
 			const char *val = "require_tls";
 			if (purple_account_get_bool(account, "old_ssl", FALSE))
 				val = "old_ssl";
--- a/libpurple/blist.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/blist.c	Thu Mar 23 19:19:01 2017 +0300
@@ -101,7 +101,7 @@
 {
 	return (hb1->group == hb2->group &&
 	        hb1->account == hb2->account &&
-	        g_str_equal(hb1->name, hb2->name));
+	        purple_strequal(hb1->name, hb2->name));
 }
 
 static void _purple_blist_hbuddy_free_key(struct _purple_hbuddy *hb)
--- a/libpurple/conversation.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/conversation.c	Thu Mar 23 19:19:01 2017 +0300
@@ -61,7 +61,7 @@
 {
 	return (hc1->type == hc2->type &&
 	        hc1->account == hc2->account &&
-	        g_str_equal(hc1->name, hc2->name));
+	        purple_strequal(hc1->name, hc2->name));
 }
 
 static void _purple_conversations_hconv_free_key(struct _purple_hconv *hc)
--- a/libpurple/network.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/network.c	Thu Mar 23 19:19:01 2017 +0300
@@ -977,7 +977,7 @@
 static void
 nm_dbus_name_owner_changed_cb(DBusGProxy *proxy, char *service, char *old_owner, char *new_owner, gpointer user_data)
 {
-	if (g_str_equal(service, NM_DBUS_SERVICE)) {
+	if (purple_strequal(service, NM_DBUS_SERVICE)) {
 		gboolean old_owner_good = old_owner && (old_owner[0] != '\0');
 		gboolean new_owner_good = new_owner && (new_owner[0] != '\0');
 
--- a/libpurple/plugins/signals-test.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/plugins/signals-test.c	Thu Mar 23 19:19:01 2017 +0300
@@ -691,7 +691,7 @@
 	                  type, id, from, child, child->name,
 	                  xmlnode_get_namespace(child));
 
-	if (g_str_equal(type, "get") || g_str_equal(type, "set")) {
+	if (purple_strequal(type, "get") || purple_strequal(type, "set")) {
 		/* Send the requisite reply */
 		xmlnode *iq = xmlnode_new("iq");
 		xmlnode_set_attrib(iq, "to", from);
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Thu Mar 23 19:19:01 2017 +0300
@@ -117,7 +117,7 @@
 					                               "string for %s\n", host);
 				} else {
 					/* TODO: Validate each of these and complain */
-					if (g_str_equal(host, "*")) {
+					if (purple_strequal(host, "*")) {
 						/* Override the default priority */
 						g_free(default_priority_str);
 						default_priority_str = g_strdup(prio_str);
--- a/libpurple/privacy.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/privacy.c	Thu Mar 23 19:19:01 2017 +0300
@@ -43,7 +43,7 @@
 	name = g_strdup(purple_normalize(account, who));
 
 	for (l = account->permit; l != NULL; l = l->next) {
-		if (g_str_equal(name, l->data))
+		if (purple_strequal(name, l->data))
 			/* This buddy already exists */
 			break;
 	}
@@ -92,7 +92,7 @@
 	name = purple_normalize(account, who);
 
 	for (l = account->permit; l != NULL; l = l->next) {
-		if (g_str_equal(name, l->data))
+		if (purple_strequal(name, l->data))
 			/* We found the buddy we were looking for */
 			break;
 	}
@@ -141,7 +141,7 @@
 	name = g_strdup(purple_normalize(account, who));
 
 	for (l = account->deny; l != NULL; l = l->next) {
-		if (g_str_equal(name, l->data))
+		if (purple_strequal(name, l->data))
 			/* This buddy already exists */
 			break;
 	}
@@ -189,7 +189,7 @@
 	normalized = purple_normalize(account, who);
 
 	for (l = account->deny; l != NULL; l = l->next) {
-		if (g_str_equal(normalized, l->data))
+		if (purple_strequal(normalized, l->data))
 			/* We found the buddy we were looking for */
 			break;
 	}
@@ -372,7 +372,7 @@
 		case PURPLE_PRIVACY_ALLOW_USERS:
 			who = purple_normalize(account, who);
 			for (list=account->permit; list!=NULL; list=list->next) {
-				if (g_str_equal(who, list->data))
+				if (purple_strequal(who, list->data))
 					return TRUE;
 			}
 			return FALSE;
@@ -380,7 +380,7 @@
 		case PURPLE_PRIVACY_DENY_USERS:
 			who = purple_normalize(account, who);
 			for (list=account->deny; list!=NULL; list=list->next) {
-				if (g_str_equal(who, list->data))
+				if (purple_strequal(who, list->data))
 					return FALSE;
 			}
 			return TRUE;
--- a/libpurple/protocols/jabber/auth.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/auth.c	Thu Mar 23 19:19:01 2017 +0300
@@ -167,7 +167,7 @@
 		JabberSaslMech *possible = l->data;
 
 		/* Is this the Cyrus SASL mechanism? */
-		if (g_str_equal(possible->name, "*")) {
+		if (purple_strequal(possible->name, "*")) {
 			js->auth_mech = possible;
 			break;
 		}
@@ -224,7 +224,7 @@
 		/* FIXME: Why is this not in jabber_parse_error? */
 		if((error = xmlnode_get_child(packet, "error")) &&
 					(err_code = xmlnode_get_attrib(error, "code")) &&
-					g_str_equal(err_code, "401")) {
+					purple_strequal(err_code, "401")) {
 			reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 			/* Clear the pasword if it isn't being saved */
 			if (!purple_account_get_remember_password(account))
@@ -343,7 +343,7 @@
 	 * is requiring SSL/TLS, we need to enforce it.
 	 */
 	if (!jabber_stream_is_ssl(js) &&
-			g_str_equal("require_tls",
+			purple_strequal("require_tls",
 				purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
 		purple_connection_error_reason(js->gc,
 			PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
--- a/libpurple/protocols/jabber/auth_cyrus.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/auth_cyrus.c	Thu Mar 23 19:19:01 2017 +0300
@@ -274,7 +274,7 @@
 					js->auth_fail_count++;
 
 				if (js->auth_fail_count == 1 &&
-					(js->sasl_mechs->str && g_str_equal(js->sasl_mechs->str, "GSSAPI"))) {
+					(js->sasl_mechs->str && purple_strequal(js->sasl_mechs->str, "GSSAPI"))) {
 					/* If we tried GSSAPI first, it failed, and it was the only method we had to try, try jabber:iq:auth
 					 * for compatibility with iChat 10.5 Server and other jabberd based servers.
 					 *
@@ -424,7 +424,7 @@
 		 * mechanisms"...  Easiest just to blacklist it (for now).
 		 */
 		if (!mech_name || !*mech_name ||
-				g_str_equal(mech_name, "EXTERNAL")) {
+				purple_strequal(mech_name, "EXTERNAL")) {
 			g_free(mech_name);
 			continue;
 		}
@@ -569,7 +569,7 @@
 			return jabber_auth_start_cyrus(js, reply, error);
 
 		} else if ((js->auth_fail_count == 1) &&
-				   (js->current_mech && g_str_equal(js->current_mech, "GSSAPI"))) {
+				   (js->current_mech && purple_strequal(js->current_mech, "GSSAPI"))) {
 			/* If we tried GSSAPI first, it failed, and it was the only method we had to try, try jabber:iq:auth
 			 * for compatibility with iChat 10.5 Server and other jabberd based servers.
 			 *
--- a/libpurple/protocols/jabber/bosh.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/bosh.c	Thu Mar 23 19:19:01 2017 +0300
@@ -505,10 +505,10 @@
 			 * the right xmlns on these packets.  See #11315.
 			 */
 			if ((xmlns == NULL /* shouldn't happen, but is equally wrong */ ||
-					g_str_equal(xmlns, NS_BOSH)) &&
-				(g_str_equal(child->name, "iq") ||
-				 g_str_equal(child->name, "message") ||
-				 g_str_equal(child->name, "presence"))) {
+					purple_strequal(xmlns, NS_BOSH)) &&
+				(purple_strequal(child->name, "iq") ||
+				 purple_strequal(child->name, "message") ||
+				 purple_strequal(child->name, "presence"))) {
 				xmlnode_set_namespace(child, NS_XMPP_CLIENT);
 			}
 			jabber_process_packet(js, &child);
--- a/libpurple/protocols/jabber/buddy.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/buddy.c	Thu Mar 23 19:19:01 2017 +0300
@@ -218,7 +218,7 @@
 	for (l = jb->resources; l; l = l->next)
 	{
 		JabberBuddyResource *jbr = l->data;
-		if (jbr->name && g_str_equal(resource, jbr->name))
+		if (jbr->name && purple_strequal(resource, jbr->name))
 			return jbr;
 	}
 
@@ -1075,7 +1075,7 @@
 
 					if(!strcmp(child2->name, "POBOX")) {
 						purple_notify_user_info_add_pair_plaintext(user_info, _("P.O. Box"), text2);
-					} else if (g_str_equal(child2->name, "EXTADD") || g_str_equal(child2->name, "EXTADR")) {
+					} else if (purple_strequal(child2->name, "EXTADD") || purple_strequal(child2->name, "EXTADR")) {
 						/*
 						 * EXTADD is correct, EXTADR is generated by other
 						 * clients. The next time someone reads this, remove
--- a/libpurple/protocols/jabber/caps.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/caps.c	Thu Mar 23 19:19:01 2017 +0300
@@ -93,8 +93,8 @@
 	const JabberCapsTuple *name1 = v1;
 	const JabberCapsTuple *name2 = v2;
 
-	return g_str_equal(name1->node, name2->node) &&
-	       g_str_equal(name1->ver, name2->ver) &&
+	return purple_strequal(name1->node, name2->node) &&
+	       purple_strequal(name1->ver, name2->ver) &&
 	       purple_strequal(name1->hash, name2->hash);
 }
 
@@ -233,7 +233,7 @@
 	if(!capsdata)
 		return;
 
-	if (!g_str_equal(capsdata->name, "capabilities")) {
+	if (!purple_strequal(capsdata->name, "capabilities")) {
 		xmlnode_free(capsdata);
 		return;
 	}
@@ -241,7 +241,7 @@
 	for (client = capsdata->child; client; client = client->next) {
 		if (client->type != XMLNODE_TYPE_TAG)
 			continue;
-		if (g_str_equal(client->name, "client")) {
+		if (purple_strequal(client->name, "client")) {
 			JabberCapsClientInfo *value = g_new0(JabberCapsClientInfo, 1);
 			JabberCapsTuple *key = (JabberCapsTuple*)&value->tuple;
 			xmlnode *child;
@@ -257,12 +257,12 @@
 			for (child = client->child; child; child = child->next) {
 				if (child->type != XMLNODE_TYPE_TAG)
 					continue;
-				if (g_str_equal(child->name, "feature")) {
+				if (purple_strequal(child->name, "feature")) {
 					const char *var = xmlnode_get_attrib(child, "var");
 					if(!var)
 						continue;
 					value->features = g_list_append(value->features,g_strdup(var));
-				} else if (g_str_equal(child->name, "identity")) {
+				} else if (purple_strequal(child->name, "identity")) {
 					const char *category = xmlnode_get_attrib(child, "category");
 					const char *type = xmlnode_get_attrib(child, "type");
 					const char *name = xmlnode_get_attrib(child, "name");
@@ -279,13 +279,13 @@
 					id->lang = g_strdup(lang);
 
 					value->identities = g_list_append(value->identities,id);
-				} else if (g_str_equal(child->name, "x")) {
+				} else if (purple_strequal(child->name, "x")) {
 					/* TODO: See #7814 -- this might cause problems if anyone
 					 * ever actually specifies forms. In fact, for this to
 					 * work properly, that bug needs to be fixed in
 					 * xmlnode_from_str, not the output version... */
 					value->forms = g_list_append(value->forms, xmlnode_copy(child));
-				} else if (g_str_equal(child->name, "ext")) {
+				} else if (purple_strequal(child->name, "ext")) {
 					if (key->hash != NULL)
 						purple_debug_warning("jabber", "Ignoring exts when reading new-style caps\n");
 					else {
@@ -300,7 +300,7 @@
 						for (node = child->child; node; node = node->next) {
 							if (node->type != XMLNODE_TYPE_TAG)
 								continue;
-							if (g_str_equal(node->name, "feature")) {
+							if (purple_strequal(node->name, "feature")) {
 								const char *var = xmlnode_get_attrib(node, "var");
 								if (!var)
 									continue;
@@ -357,7 +357,7 @@
 	for (i = 0; exts[i]; ++i) {
 		/* Hack since we advertise the ext along with v1.5 caps but don't
 		 * store any exts */
-		if (g_str_equal(exts[i], "voice-v1") && !info->exts)
+		if (purple_strequal(exts[i], "voice-v1") && !info->exts)
 			continue;
 		if (!info->exts ||
 				!g_hash_table_lookup(info->exts->exts, exts[i]))
@@ -460,13 +460,13 @@
 		 * size in jabber_caps_calculate_hash is large enough. The cipher API
 		 * doesn't seem to offer a "Get the hash size" function(?).
 		 */
-		if (g_str_equal(userdata->hash, "sha-1")) {
+		if (purple_strequal(userdata->hash, "sha-1")) {
 			hash = jabber_caps_calculate_hash(info, "sha1");
-		} else if (g_str_equal(userdata->hash, "md5")) {
+		} else if (purple_strequal(userdata->hash, "md5")) {
 			hash = jabber_caps_calculate_hash(info, "md5");
 		}
 
-		if (!hash || !g_str_equal(hash, userdata->ver)) {
+		if (!hash || !purple_strequal(hash, userdata->ver)) {
 			purple_debug_warning("jabber", "Could not validate caps info from "
 			                     "%s. Expected %s, got %s\n",
 			                     xmlnode_get_attrib(packet, "from"),
@@ -728,7 +728,7 @@
 	xmlnode *child;
 	JabberCapsClientInfo *info;
 
-	if (!query || !g_str_equal(query->name, "query") ||
+	if (!query || !purple_strequal(query->name, "query") ||
 			!purple_strequal(query->xmlns, NS_DISCO_INFO))
 		return NULL;
 
@@ -737,7 +737,7 @@
 	for(child = query->child; child; child = child->next) {
 		if (child->type != XMLNODE_TYPE_TAG)
 			continue;
-		if (g_str_equal(child->name, "identity")) {
+		if (purple_strequal(child->name, "identity")) {
 			/* parse identity */
 			const char *category = xmlnode_get_attrib(child, "category");
 			const char *type = xmlnode_get_attrib(child, "type");
@@ -755,12 +755,12 @@
 			id->lang = g_strdup(lang);
 
 			info->identities = g_list_append(info->identities, id);
-		} else if (g_str_equal(child->name, "feature")) {
+		} else if (purple_strequal(child->name, "feature")) {
 			/* parse feature */
 			const char *var = xmlnode_get_attrib(child, "var");
 			if (var)
 				info->features = g_list_prepend(info->features, g_strdup(var));
-		} else if (g_str_equal(child->name, "x")) {
+		} else if (purple_strequal(child->name, "x")) {
 			if (purple_strequal(child->xmlns, "jabber:x:data")) {
 				/* x-data form */
 				xmlnode *dataform = xmlnode_copy(child);
@@ -878,7 +878,7 @@
 			GList *value;
 			JabberDataFormField *field = (JabberDataFormField*)fields->data;
 
-			if (!g_str_equal(field->var, "FORM_TYPE")) {
+			if (!purple_strequal(field->var, "FORM_TYPE")) {
 				/* Append the "var" attribute */
 				append_escaped_string(context, field->var);
 				/* Append <value/> elements' cdata */
@@ -956,7 +956,7 @@
 	for (node = accounts; node; node = node->next) {
 		PurpleAccount *account = node->data;
 		const char *prpl_id = purple_account_get_protocol_id(account);
-		if (g_str_equal("prpl-jabber", prpl_id) && purple_account_is_connected(account)) {
+		if (purple_strequal("prpl-jabber", prpl_id) && purple_account_is_connected(account)) {
 			PurpleConnection *gc = purple_account_get_connection(account);
 			jabber_presence_send(gc->proto_data, TRUE);
 		}
--- a/libpurple/protocols/jabber/disco.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/disco.c	Thu Mar 23 19:19:01 2017 +0300
@@ -123,7 +123,7 @@
 		if(node)
 			xmlnode_set_attrib(query, "node", node);
 
-		if(!node || g_str_equal(node, node_uri)) {
+		if(!node || purple_strequal(node, node_uri)) {
 			GList *features, *identities;
 			for(identities = jabber_identities; identities; identities = identities->next) {
 				JabberIdentity *ident = (JabberIdentity*)identities->data;
@@ -143,7 +143,7 @@
 				}
 			}
 #ifdef USE_VV
-		} else if (g_str_equal(node, CAPS0115_NODE "#" "voice-v1")) {
+		} else if (purple_strequal(node, CAPS0115_NODE "#" "voice-v1")) {
 			/*
 			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
 			 * where we add <c/> to the <presence/>) for the Google Talk
@@ -155,7 +155,7 @@
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
 			xmlnode_set_attrib(feature, "var", NS_GOOGLE_VOICE);
-		} else if (g_str_equal(node, CAPS0115_NODE "#" "video-v1")) {
+		} else if (purple_strequal(node, CAPS0115_NODE "#" "video-v1")) {
 			/*
 			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
 			 * where we add <c/> to the <presence/>) for the Google Talk
@@ -167,7 +167,7 @@
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
 			xmlnode_set_attrib(feature, "var", NS_GOOGLE_VIDEO);
-		} else if (g_str_equal(node, CAPS0115_NODE "#" "camera-v1")) {
+		} else if (purple_strequal(node, CAPS0115_NODE "#" "camera-v1")) {
 			/*
 			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
 			 * where we add <c/> to the <presence/>) for the Google Talk
--- a/libpurple/protocols/jabber/google/google_session.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/google/google_session.c	Thu Mar 23 19:19:01 2017 +0300
@@ -638,11 +638,11 @@
 
 			g_snprintf(n, sizeof(n), "S%d", name++);
 
-			if (g_str_equal(type, "local"))
+			if (purple_strequal(type, "local"))
 				candidate_type = PURPLE_MEDIA_CANDIDATE_TYPE_HOST;
-			else if (g_str_equal(type, "stun"))
+			else if (purple_strequal(type, "stun"))
 				candidate_type = PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX;
-			else if (g_str_equal(type, "relay"))
+			else if (purple_strequal(type, "relay"))
 				candidate_type = PURPLE_MEDIA_CANDIDATE_TYPE_RELAY;
 			else
 				candidate_type = PURPLE_MEDIA_CANDIDATE_TYPE_HOST;
--- a/libpurple/protocols/jabber/ibb.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/ibb.c	Thu Mar 23 19:19:01 2017 +0300
@@ -386,9 +386,9 @@
                  const char *id, xmlnode *child)
 {
 	const char *name = child->name;
-	gboolean data  = g_str_equal(name, "data");
-	gboolean close = g_str_equal(name, "close");
-	gboolean open  = g_str_equal(name, "open");
+	gboolean data  = purple_strequal(name, "data");
+	gboolean close = purple_strequal(name, "close");
+	gboolean open  = purple_strequal(name, "open");
 	const gchar *sid = (data || close) ?
 		xmlnode_get_attrib(child, "sid") : NULL;
 	JabberIBBSession *sess =
--- a/libpurple/protocols/jabber/jabber.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/jabber.c	Thu Mar 23 19:19:01 2017 +0300
@@ -228,7 +228,7 @@
 	 */
 	{
 		const gchar *connection_security = purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS);
-		if (!g_str_equal(connection_security, "none") &&
+		if (!purple_strequal(connection_security, "none") &&
 				purple_ssl_is_supported()) {
 			jabber_send_raw(js,
 					"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
@@ -253,7 +253,7 @@
 		return TRUE;
 	}
 
-	if (g_str_equal("require_tls", purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
+	if (purple_strequal("require_tls", purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
 		purple_connection_error_reason(js->gc,
 				PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
 				_("You require encryption, but no TLS/SSL support was found."));
@@ -274,7 +274,7 @@
 			jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING_ENCRYPTION);
 			return;
 		}
-	} else if (g_str_equal(connection_security, "require_tls") && !jabber_stream_is_ssl(js)) {
+	} else if (purple_strequal(connection_security, "require_tls") && !jabber_stream_is_ssl(js)) {
 		purple_connection_error_reason(js->gc,
 			 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
 			_("You require encryption, but it is not available on this server."));
@@ -348,26 +348,26 @@
 	} else if(!strcmp((*packet)->name, "message")) {
 		jabber_message_parse(js, *packet);
 	} else if (purple_strequal(xmlns, NS_XMPP_STREAMS)) {
-		if (g_str_equal(name, "features"))
+		if (purple_strequal(name, "features"))
 			jabber_stream_features_parse(js, *packet);
-		else if (g_str_equal(name, "error"))
+		else if (purple_strequal(name, "error"))
 			jabber_stream_handle_error(js, *packet);
 	} else if (purple_strequal(xmlns, NS_XMPP_SASL)) {
 		if (js->state != JABBER_STREAM_AUTHENTICATING)
 			purple_debug_warning("jabber", "Ignoring spurious SASL stanza %s\n", name);
 		else {
-			if (g_str_equal(name, "challenge"))
+			if (purple_strequal(name, "challenge"))
 				jabber_auth_handle_challenge(js, *packet);
-			else if (g_str_equal(name, "success"))
+			else if (purple_strequal(name, "success"))
 				jabber_auth_handle_success(js, *packet);
-			else if (g_str_equal(name, "failure"))
+			else if (purple_strequal(name, "failure"))
 				jabber_auth_handle_failure(js, *packet);
 		}
 	} else if (purple_strequal(xmlns, NS_XMPP_TLS)) {
 		if (js->state != JABBER_STREAM_INITIALIZING_ENCRYPTION || js->gsc)
 			purple_debug_warning("jabber", "Ignoring spurious %s\n", name);
 		else {
-			if (g_str_equal(name, "proceed"))
+			if (purple_strequal(name, "proceed"))
 				tls_init(js);
 			/* TODO: Handle <failure/>, I guess? */
 		}
@@ -602,9 +602,9 @@
 		return;
 
 	if (js->bosh)
-		if (g_str_equal((*packet)->name, "message") ||
-				g_str_equal((*packet)->name, "iq") ||
-				g_str_equal((*packet)->name, "presence"))
+		if (purple_strequal((*packet)->name, "message") ||
+				purple_strequal((*packet)->name, "iq") ||
+				purple_strequal((*packet)->name, "presence"))
 			xmlnode_set_namespace(*packet, NS_XMPP_CLIENT);
 	txt = xmlnode_to_str(*packet, &len);
 	jabber_send_raw(js, txt, len);
@@ -1050,7 +1050,7 @@
 	js->certificate_CN = g_strdup(connect_server[0] ? connect_server : js->user->domain);
 
 	/* if they've got old-ssl mode going, we probably want to ignore SRV lookups */
-	if (g_str_equal("old_ssl", purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
+	if (purple_strequal("old_ssl", purple_account_get_string(account, "connection_security", JABBER_DEFAULT_REQUIRE_TLS))) {
 		if(purple_ssl_is_supported()) {
 			js->gsc = purple_ssl_connect(account, js->certificate_CN,
 					purple_account_get_int(account, "port", 5223),
@@ -1094,7 +1094,7 @@
 		return;
 
 	/* TODO: Remove this at some point.  Added 2010-02-14 (v2.6.6) */
-	if (g_str_equal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
+	if (purple_strequal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
 		purple_account_set_string(account, "ft_proxies", JABBER_DEFAULT_FT_PROXIES);
 
 	/*
@@ -1817,7 +1817,7 @@
 	}
 
 	account = purple_connection_get_account(js->gc);
-	is_block = g_str_equal(child->name, "block");
+	is_block = purple_strequal(child->name, "block");
 
 	item = xmlnode_get_child(child, "item");
 	if (!is_block && item == NULL) {
@@ -2055,8 +2055,8 @@
 	/* Check if this identity is already there... */
 	for (identity = jabber_identities; identity; identity = identity->next) {
 		JabberIdentity *id = identity->data;
-		if (g_str_equal(id->category, category) &&
-			g_str_equal(id->type, type) &&
+		if (purple_strequal(id->category, category) &&
+			purple_strequal(id->type, type) &&
 			purple_strequal(id->lang, lang))
 			return;
 	}
--- a/libpurple/protocols/jabber/jingle/rtp.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Thu Mar 23 19:19:01 2017 +0300
@@ -608,7 +608,7 @@
 		transmitter = "notransmitter";
 	g_object_unref(transport);
 
-	is_audio = g_str_equal(media_type, "audio");
+	is_audio = purple_strequal(media_type, "audio");
 
 	if (purple_strequal(senders, "both"))
 		type = is_audio ? PURPLE_MEDIA_AUDIO
@@ -636,7 +636,7 @@
 		return FALSE;
 	}
 
-	if (g_str_equal(creator, "initiator"))
+	if (purple_strequal(creator, "initiator"))
 		is_creator = jingle_session_is_initiator(session);
 	else
 		is_creator = !jingle_session_is_initiator(session);
@@ -675,9 +675,9 @@
 		return NULL;
 	}
 
-	if (g_str_equal(media, "video")) {
+	if (purple_strequal(media, "video")) {
 		type = PURPLE_MEDIA_VIDEO;
-	} else if (g_str_equal(media, "audio")) {
+	} else if (purple_strequal(media, "audio")) {
 		type = PURPLE_MEDIA_AUDIO;
 	} else {
 		purple_debug_warning("jingle-rtp", "unknown media type: %s\n",
--- a/libpurple/protocols/jabber/jingle/session.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/jingle/session.c	Thu Mar 23 19:19:01 2017 +0300
@@ -385,7 +385,7 @@
 	gchar *cmp_jid = use_bare ? jabber_get_bare_jid(remote_jid)
 				  : g_strdup(remote_jid);
 	g_free(remote_jid);
-	if (g_str_equal(jid, cmp_jid)) {
+	if (purple_strequal(jid, cmp_jid)) {
 		g_free(cmp_jid);
 		return TRUE;
 	}
@@ -515,7 +515,7 @@
 	for (; iter; iter = g_list_next(iter)) {
 		JingleContent *content = iter->data;
 		gchar *cname = jingle_content_get_name(content);
-		gboolean result = g_str_equal(name, cname);
+		gboolean result = purple_strequal(name, cname);
 		g_free(cname);
 
 		if (creator != NULL) {
@@ -542,7 +542,7 @@
 	for (; iter; iter = g_list_next(iter)) {
 		JingleContent *content = iter->data;
 		gchar *cname = jingle_content_get_name(content);
-		gboolean result = g_str_equal(name, cname);
+		gboolean result = purple_strequal(name, cname);
 		g_free(cname);
 
 		if (creator != NULL) {
--- a/libpurple/protocols/jabber/jutil.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/jutil.c	Thu Mar 23 19:19:01 2017 +0300
@@ -666,7 +666,7 @@
 		return FALSE;
 
 	equal = (jid->node == NULL &&
-	         g_str_equal(jid->domain, js->user->domain) &&
+	         purple_strequal(jid->domain, js->user->domain) &&
 	         jid->resource == NULL);
 	jabber_id_free(jid);
 	return equal;
@@ -688,9 +688,9 @@
 		return FALSE;
 
 	equal = (purple_strequal(jid->node, js->user->node) &&
-	         g_str_equal(jid->domain, js->user->domain) &&
+	         purple_strequal(jid->domain, js->user->domain) &&
 	         (jid->resource == NULL ||
-	             g_str_equal(jid->resource, js->user->resource)));
+	             purple_strequal(jid->resource, js->user->resource)));
 	jabber_id_free(jid);
 	return equal;
 }
@@ -729,7 +729,7 @@
 		return JABBER_BUDDY_STATE_UNKNOWN;
 
 	for (i = 0; i < G_N_ELEMENTS(jabber_statuses); ++i)
-		if (g_str_equal(id, jabber_statuses[i].status_id))
+		if (purple_strequal(id, jabber_statuses[i].status_id))
 			return jabber_statuses[i].state;
 
 	return JABBER_BUDDY_STATE_UNKNOWN;
@@ -742,7 +742,7 @@
 	g_return_val_if_fail(id != NULL, JABBER_BUDDY_STATE_UNKNOWN);
 
 	for (i = 0; i < G_N_ELEMENTS(jabber_statuses); ++i)
-		if (jabber_statuses[i].show && g_str_equal(id, jabber_statuses[i].show))
+		if (jabber_statuses[i].show && purple_strequal(id, jabber_statuses[i].show))
 			return jabber_statuses[i].state;
 
 	purple_debug_warning("jabber", "Invalid value of presence <show/> "
--- a/libpurple/protocols/jabber/message.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/message.c	Thu Mar 23 19:19:01 2017 +0300
@@ -129,7 +129,7 @@
 
 			conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
 			                                             jm->from, account);
-			if (conv && !g_str_equal(jm->from,
+			if (conv && !purple_strequal(jm->from,
 			                         purple_conversation_get_name(conv))) {
 				purple_debug_info("jabber", "Binding conversation to %s\n",
 				                  jm->from);
@@ -764,7 +764,7 @@
 			} else {
 				jm->etc = g_list_append(jm->etc, child);
 			}
-		} else if (g_str_equal(child->name, "query")) {
+		} else if (purple_strequal(child->name, "query")) {
 			const char *node = xmlnode_get_attrib(child, "node");
 			if (purple_strequal(xmlns, NS_DISCO_ITEMS)
 					&& purple_strequal(node, "http://jabber.org/protocol/commands")) {
--- a/libpurple/protocols/jabber/parser.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/parser.c	Thu Mar 23 19:19:01 2017 +0300
@@ -192,7 +192,7 @@
 	JabberStream *js = user_data;
 
 	if (error->level == XML_ERR_WARNING && error->message != NULL
-			&& g_str_equal(error->message, "xmlns: URI vcard-temp is not absolute\n"))
+			&& purple_strequal(error->message, "xmlns: URI vcard-temp is not absolute\n"))
 		/*
 		 * This message happens when parsing vcards, and is normal, so don't
 		 * bother logging it because people scare easily.
--- a/libpurple/protocols/jabber/presence.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/presence.c	Thu Mar 23 19:19:01 2017 +0300
@@ -69,7 +69,7 @@
 		return JABBER_PRESENCE_AVAILABLE;
 
 	for (i = 0; i < G_N_ELEMENTS(jabber_presence_types); ++i)
-		if (g_str_equal(type, jabber_presence_types[i].name))
+		if (purple_strequal(type, jabber_presence_types[i].name))
 			return jabber_presence_types[i].type;
 
 	purple_debug_warning("jabber", "Unknown presence type '%s'\n", type);
@@ -591,7 +591,7 @@
 		}
 
 		if (g_slist_find(presence->chat_info.codes, GINT_TO_POINTER(110)) ||
-				g_str_equal(presence->jid_from->resource, chat->handle) ||
+				purple_strequal(presence->jid_from->resource, chat->handle) ||
 				purple_strequal(presence->to, jid))
 			is_our_resource = TRUE;
 
@@ -620,9 +620,9 @@
 		if (purple_strequal(affiliation, "owner"))
 			flags |= PURPLE_CBFLAGS_FOUNDER;
 		if (role) {
-			if (g_str_equal(role, "moderator"))
+			if (purple_strequal(role, "moderator"))
 				flags |= PURPLE_CBFLAGS_OP;
-			else if (g_str_equal(role, "participant"))
+			else if (purple_strequal(role, "participant"))
 				flags |= PURPLE_CBFLAGS_VOICE;
 		}
 
@@ -669,7 +669,7 @@
 			return FALSE;
 		}
 
-		is_our_resource = g_str_equal(presence->jid_from->resource, chat->handle);
+		is_our_resource = purple_strequal(presence->jid_from->resource, chat->handle);
 
 		jabber_buddy_remove_resource(presence->jb, presence->jid_from->resource);
 
@@ -698,7 +698,7 @@
 				} else {
 					nick_change = TRUE;
 
-					if (g_str_equal(presence->jid_from->resource, chat->handle)) {
+					if (purple_strequal(presence->jid_from->resource, chat->handle)) {
 						/* Changing our own nickname */
 						g_free(chat->handle);
 						/* TODO: This should be resourceprep'd */
@@ -1051,8 +1051,8 @@
 
 			/* Look it up if we don't already have all this information */
 			if (!jbr || !jbr->caps.info ||
-					!g_str_equal(node, jbr->caps.info->tuple.node) ||
-					!g_str_equal(ver, jbr->caps.info->tuple.ver) ||
+					!purple_strequal(node, jbr->caps.info->tuple.node) ||
+					!purple_strequal(ver, jbr->caps.info->tuple.ver) ||
 					!purple_strequal(hash, jbr->caps.info->tuple.hash) ||
 					!jabber_caps_exts_known(jbr->caps.info, (gchar **)exts)) {
 				JabberPresenceCapabilities *userdata = g_new0(JabberPresenceCapabilities, 1);
--- a/libpurple/protocols/jabber/roster.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/jabber/roster.c	Thu Mar 23 19:19:01 2017 +0300
@@ -228,17 +228,17 @@
 			continue;
 
 		if(subscription) {
-			if (g_str_equal(subscription, "remove"))
+			if (purple_strequal(subscription, "remove"))
 				jb->subscription = JABBER_SUB_REMOVE;
 			else if (jb == js->user_jb)
 				jb->subscription = JABBER_SUB_BOTH;
-			else if (g_str_equal(subscription, "none"))
+			else if (purple_strequal(subscription, "none"))
 				jb->subscription = JABBER_SUB_NONE;
-			else if (g_str_equal(subscription, "to"))
+			else if (purple_strequal(subscription, "to"))
 				jb->subscription = JABBER_SUB_TO;
-			else if (g_str_equal(subscription, "from"))
+			else if (purple_strequal(subscription, "from"))
 				jb->subscription = JABBER_SUB_FROM;
-			else if (g_str_equal(subscription, "both"))
+			else if (purple_strequal(subscription, "both"))
 				jb->subscription = JABBER_SUB_BOTH;
 		}
 
--- a/libpurple/protocols/oscar/oscar.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/protocols/oscar/oscar.c	Thu Mar 23 19:19:01 2017 +0300
@@ -745,7 +745,7 @@
 	}
 
 	gc->flags |= PURPLE_CONNECTION_HTML;
-	if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq")) {
+	if (purple_strequal(purple_account_get_protocol_id(account), "prpl-icq")) {
 		od->icq = TRUE;
 	} else {
 		gc->flags |= PURPLE_CONNECTION_AUTO_RESP;
@@ -753,7 +753,7 @@
 
 	/* Set this flag based on the protocol_id rather than the username,
 	   because that is what's tied to the get_moods prpl callback. */
-	if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq"))
+	if (purple_strequal(purple_account_get_protocol_id(account), "prpl-icq"))
 		gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS;
 
 	od->default_port = purple_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT);
@@ -5847,7 +5847,7 @@
 		OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY);
 	prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
 
-	if (g_str_equal(purple_plugin_get_id(plugin), "prpl-aim")) {
+	if (purple_strequal(purple_plugin_get_id(plugin), "prpl-aim")) {
 		option = purple_account_option_bool_new(_("Allow multiple simultaneous logins"), "allow_multiple_logins",
 												OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS);
 		prpl_info->protocol_options = g_list_append(prpl_info->protocol_options, option);
--- a/libpurple/tests/test_jabber_scram.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/tests/test_jabber_scram.c	Thu Mar 23 19:19:01 2017 +0300
@@ -70,7 +70,7 @@
 	\
 	ret = jabber_scram_feed_parser(data, challenge1, &out); \
 	fail_unless(ret == TRUE); \
-	fail_unless(g_str_equal(out, response1), "Got unexpected response to challenge. Expected %s, got %s", response1, out); \
+	fail_unless(purple_strequal(out, response1), "Got unexpected response to challenge. Expected %s, got %s", response1, out); \
 	g_free(out); \
 	\
 	data->step = 2; \
--- a/libpurple/util.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/libpurple/util.c	Thu Mar 23 19:19:01 2017 +0300
@@ -3434,7 +3434,7 @@
 
 	tmp++;
 
-	if (g_str_equal(proto, "xmpp"))
+	if (purple_strequal(proto, "xmpp"))
 		delimiter = ';';
 	else
 		delimiter = '&';
--- a/pidgin/gtkblist.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/gtkblist.c	Thu Mar 23 19:19:01 2017 +0300
@@ -8238,7 +8238,7 @@
 	for (l = pidgin_blist_sort_methods; l; l = l->next) {
 		method = (PidginBlistSortMethod *) l->data;
 		menuitem = gtk_radio_menu_item_new_with_label(sl, _(method->name));
-		if (g_str_equal(m, method->id))
+		if (purple_strequal(m, method->id))
 			activeitem = menuitem;
 		sl = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem));
 		gtk_menu_shell_append(GTK_MENU_SHELL(sortmenu), menuitem);
--- a/pidgin/gtkprefs.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/gtkprefs.c	Thu Mar 23 19:19:01 2017 +0300
@@ -415,7 +415,7 @@
 		do {
 			gtk_tree_model_get(GTK_TREE_MODEL(prefs_sound_themes), &iter, 2, &name, -1);
 
-			print_custom = customized && name && g_str_equal(current_theme, name);
+			print_custom = customized && name && purple_strequal(current_theme, name);
 
 			if (!name || *name == '\0') {
 				g_free(name);
@@ -504,7 +504,7 @@
 		do {
 			gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 2, &theme, -1);
 
-			if (g_str_equal(current_theme, theme)) {
+			if (purple_strequal(current_theme, theme)) {
 				gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo_box), &iter);
 				unset = FALSE;
 			}
@@ -667,7 +667,7 @@
 	/* Just to be safe */
 	g_strchomp(path);
 
-	if ((is_smiley_theme = g_str_equal(info->type, "smiley")))
+	if ((is_smiley_theme = purple_strequal(info->type, "smiley")))
 		destdir = g_build_filename(purple_user_dir(), "smileys", NULL);
 	else
 		destdir = g_build_filename(purple_user_dir(), "themes", "temp", NULL);
@@ -1016,7 +1016,7 @@
 
 		gtk_tree_model_get(GTK_TREE_MODEL(prefs_blist_themes), &iter, 2, &name, -1);
 
-		if(!name || !g_str_equal(name, ""))
+		if(!name || !purple_strequal(name, ""))
 			theme = PIDGIN_BLIST_THEME(purple_theme_manager_find_theme(name, "blist"));
 
 		g_free(name);
@@ -1037,7 +1037,7 @@
 
 		gtk_tree_model_get(GTK_TREE_MODEL(prefs_status_icon_themes), &iter, 2, &name, -1);
 
-		if(!name || !g_str_equal(name, ""))
+		if(!name || !purple_strequal(name, ""))
 			theme = PIDGIN_STATUS_ICON_THEME(purple_theme_manager_find_theme(name, "status-icon"));
 
 		g_free(name);
--- a/pidgin/gtkstatusbox.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/gtkstatusbox.c	Thu Mar 23 19:19:01 2017 +0300
@@ -1019,7 +1019,7 @@
 		PurpleAccount *acct2 = iter->data;
 		GList *s1, *s2;
 
-		if (!g_str_equal(prpl1, purple_account_get_protocol_id(acct2))) {
+		if (!purple_strequal(prpl1, purple_account_get_protocol_id(acct2))) {
 			acct1 = NULL;
 			break;
 		}
@@ -2383,7 +2383,7 @@
 			acct_status_type = find_status_type_by_index(status_box->token_status_account, active);
 			id = purple_status_type_get_id(acct_status_type);
 
-			if (g_str_equal(id, purple_status_get_id(status)) &&
+			if (purple_strequal(id, purple_status_get_id(status)) &&
 				purple_strequal(message, purple_status_get_attr_string(status, "message")))
 			{
 				/* Selected status and previous status is the same */
@@ -2483,7 +2483,7 @@
 		status_type = find_status_type_by_index(status_box->account, active);
 		id = purple_status_type_get_id(status_type);
 
-		if (g_str_equal(id, purple_status_get_id(status)) &&
+		if (purple_strequal(id, purple_status_get_id(status)) &&
 			purple_strequal(message, purple_status_get_attr_string(status, "message")))
 		{
 			/* Selected status and previous status is the same */
--- a/pidgin/gtkutils.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/gtkutils.c	Thu Mar 23 19:19:01 2017 +0300
@@ -2433,10 +2433,10 @@
 
 				purple_debug_info("buddyicon", "Converting buddy icon to %s\n", prpl_formats[i]);
 
-				if (g_str_equal(prpl_formats[i], "png")) {
+				if (purple_strequal(prpl_formats[i], "png")) {
 					key = "compression";
 					value = "9";
-				} else if (g_str_equal(prpl_formats[i], "jpeg")) {
+				} else if (purple_strequal(prpl_formats[i], "jpeg")) {
 					sprintf(tmp_buf, "%u", quality);
 					key = "quality";
 					value = tmp_buf;
@@ -2477,7 +2477,7 @@
 
 				g_free(contents);
 
-				if (!g_str_equal(prpl_formats[i], "jpeg")) {
+				if (!purple_strequal(prpl_formats[i], "jpeg")) {
 					/* File size was too big and we can't lower the quality,
 					   so skip to the next image type. */
 					break;
--- a/pidgin/plugins/disco/xmppdisco.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/plugins/disco/xmppdisco.c	Thu Mar 23 19:19:01 2017 +0300
@@ -224,18 +224,18 @@
 	if (!category)
 		return XMPP_DISCO_SERVICE_TYPE_OTHER;
 
-	if (g_str_equal(category, "conference"))
+	if (purple_strequal(category, "conference"))
 		return XMPP_DISCO_SERVICE_TYPE_CHAT;
-	else if (g_str_equal(category, "directory"))
+	else if (purple_strequal(category, "directory"))
 		return XMPP_DISCO_SERVICE_TYPE_DIRECTORY;
-	else if (g_str_equal(category, "gateway"))
+	else if (purple_strequal(category, "gateway"))
 		return XMPP_DISCO_SERVICE_TYPE_GATEWAY;
-	else if (g_str_equal(category, "pubsub")) {
-		if (!type || g_str_equal(type, "collection"))
+	else if (purple_strequal(category, "pubsub")) {
+		if (!type || purple_strequal(type, "collection"))
 			return XMPP_DISCO_SERVICE_TYPE_PUBSUB_COLLECTION;
-		else if (g_str_equal(type, "leaf"))
+		else if (purple_strequal(type, "leaf"))
 			return XMPP_DISCO_SERVICE_TYPE_PUBSUB_LEAF;
-		else if (g_str_equal(type, "service"))
+		else if (purple_strequal(type, "service"))
 			return XMPP_DISCO_SERVICE_TYPE_OTHER;
 		else {
 			purple_debug_warning("xmppdisco", "Unknown pubsub type '%s'\n", type);
@@ -285,7 +285,7 @@
 	if (!list->in_progress)
 		goto out;
 
-	if (g_str_equal(type, "result") &&
+	if (purple_strequal(type, "result") &&
 			(query = xmlnode_get_child(iq, "query"))) {
 		xmlnode *identity = xmlnode_get_child(query, "identity");
 		XmppDiscoService *service;
@@ -332,11 +332,11 @@
 			if (!(var = xmlnode_get_attrib(feature, "var")))
 				continue;
 
-			if (g_str_equal(var, NS_REGISTER))
+			if (purple_strequal(var, NS_REGISTER))
 				service->flags |= XMPP_DISCO_REGISTER;
-			else if (g_str_equal(var, NS_DISCO_ITEMS))
+			else if (purple_strequal(var, NS_DISCO_ITEMS))
 				service->flags |= XMPP_DISCO_BROWSE;
-			else if (g_str_equal(var, NS_MUC)) {
+			else if (purple_strequal(var, NS_MUC)) {
 				service->flags |= XMPP_DISCO_BROWSE;
 				service->type = XMPP_DISCO_SERVICE_TYPE_CHAT;
 			}
@@ -373,7 +373,7 @@
 	if (!list->in_progress)
 		goto out;
 
-	if (g_str_equal(type, "result") &&
+	if (purple_strequal(type, "result") &&
 			(query = xmlnode_get_child(iq, "query"))) {
 		xmlnode *item;
 
@@ -440,7 +440,7 @@
 	g_free(cb_data);
 	--list->fetch_count;
 
-	if (g_str_equal(type, "result") &&
+	if (purple_strequal(type, "result") &&
 			(query = xmlnode_get_child(iq, "query"))) {
 		xmlnode *item;
 
@@ -483,7 +483,7 @@
 
 	--list->fetch_count;
 
-	if (g_str_equal(type, "result") &&
+	if (purple_strequal(type, "result") &&
 			(query = xmlnode_get_child(iq, "query"))) {
 		xmlnode *feature;
 
--- a/pidgin/plugins/timestamp_format.c	Thu Mar 09 21:04:44 2017 -0600
+++ b/pidgin/plugins/timestamp_format.c	Thu Mar 23 19:19:01 2017 +0300
@@ -87,9 +87,9 @@
 	    !strcmp(dates, "always") ||
 	    (conv != NULL && purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT && !strcmp(dates, "chats")))
 	{
-		if (g_str_equal(force, "force24"))
+		if (purple_strequal(force, "force24"))
 			return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm), parens ? ")" : "");
-		else if (g_str_equal(force, "force12")) {
+		else if (purple_strequal(force, "force12")) {
 			char *date = g_strdup_printf("%s", purple_utf8_strftime("%Y-%m-%d ", tm));
 			char *remtime = g_strdup_printf("%s", purple_utf8_strftime(":%M:%S %p", tm));
 			const char *hour = format_12hour_hour(tm);
@@ -107,9 +107,9 @@
 			return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_date_format_long(tm), parens ? ")" : "");
 	}
 
-	if (g_str_equal(force, "force24"))
+	if (purple_strequal(force, "force24"))
 		return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%H:%M:%S", tm), parens ? ")" : "");
-	else if (g_str_equal(force, "force12")) {
+	else if (purple_strequal(force, "force12")) {
 		const char *hour = format_12hour_hour(tm);
 		char *remtime = g_strdup_printf("%s", purple_utf8_strftime(":%M:%S %p", tm));
 		char *output = g_strdup_printf("%s%s%s%s", parens ? "(" : "", hour, remtime, parens ? ")" : "");

mercurial