pidgin/pidgin

Parents d9a2e635775d
Children 0bd4ad480877
Fix a bug in purple_protocol_client_normalize which was requiring an account. Also remove the account parameter from purple_normalize_nocase as it wasn't used there.

Testing Done:
This was found when I couldn't create an IRC account, so the testing was making sure that I could create an IRC account again.

Reviewed at https://reviews.imfreedom.org/r/263/
--- a/libpurple/protocols/irc/irc.c Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/protocols/irc/irc.c Thu Dec 03 22:29:01 2020 -0600
@@ -934,7 +934,7 @@
irc_normalize(PurpleProtocolClient *client, PurpleAccount *account,
const char *who)
{
- return purple_normalize_nocase(account, who);
+ return purple_normalize_nocase(who);
}
static gssize
--- a/libpurple/protocols/novell/novell.c Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/protocols/novell/novell.c Thu Dec 03 22:29:01 2020 -0600
@@ -3479,7 +3479,7 @@
novell_normalize(PurpleProtocolClient *client, PurpleAccount *account,
const char *who)
{
- return purple_normalize_nocase(account, who);
+ return purple_normalize_nocase(who);
}
static gssize
--- a/libpurple/purpleprotocolclient.c Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/purpleprotocolclient.c Thu Dec 03 22:29:01 2020 -0600
@@ -159,7 +159,6 @@
PurpleProtocolClientInterface *iface = NULL;
g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
- g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
g_return_val_if_fail(who != NULL, NULL);
iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
--- a/libpurple/purpleprotocolclient.h Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/purpleprotocolclient.h Thu Dec 03 22:29:01 2020 -0600
@@ -263,7 +263,7 @@
/**
* purple_protocol_client_normalize:
* @client: The #PurpleProtocolClient instance.
- * @account: A #PurpleAccount instance.
+ * @account: (nullable): A #PurpleAccount instance.
* @who: The name to normalize.
*
* Normalizes a @who to the canonical form for the protocol. For example, many
--- a/libpurple/util.c Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/util.c Thu Dec 03 22:29:01 2020 -0600
@@ -922,7 +922,7 @@
* comments in util.h.
*/
const char *
-purple_normalize_nocase(const PurpleAccount *account, const char *str)
+purple_normalize_nocase(const char *str)
{
static char buf[BUF_LEN];
char *tmp1, *tmp2;
--- a/libpurple/util.h Thu Dec 03 22:28:40 2020 -0600
+++ b/libpurple/util.h Thu Dec 03 22:29:01 2020 -0600
@@ -587,7 +587,6 @@
/**
* purple_normalize_nocase:
- * @account: The account the string belongs to.
* @str: The string to normalize.
*
* Normalizes a string, so that it is suitable for comparison.
@@ -598,7 +597,7 @@
*
* Returns: A pointer to the normalized version stored in a static buffer.
*/
-const char *purple_normalize_nocase(const PurpleAccount *account, const char *str);
+const char *purple_normalize_nocase(const char *str);
/**
* purple_validate: