pidgin/pidgin

Revert my previous change.

2017-01-08, Mark Doliner
7ccb54f5d342
Revert my previous change.

Apparently it caused `make distcheck` to fail which caused a Bitbucket build pipeline to fail: https://bitbucket.org/pidgin/main/addon/pipelines/home#!/results/%7B9f059724-78b4-4a5e-9780-9a614c7c2742%7D

Not sure how to fix this.

FYI there's a daily cronjob on... rock? in that calls /srv/trac/developer.pidgin.im/mercurial_support/nightly_update.sh which updates https://developer.pidgin.im/l10n/ It's been failing for a few months.
/*
* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*
*/
#include <string.h>
#include <glib.h>
#include "dbus-useful.h"
#include "accounts.h"
#include "conversation.h"
#include "util.h"
PurpleAccount *
purple_accounts_find_ext(const char *name, const char *protocol_id,
gboolean (*account_test)(const PurpleAccount *account))
{
PurpleAccount *result = NULL;
GList *l;
char *who;
if (name)
who = g_strdup(purple_normalize(NULL, name));
else
who = NULL;
for (l = purple_accounts_get_all(); l != NULL; l = l->next) {
PurpleAccount *account = (PurpleAccount *)l->data;
if (who && strcmp(purple_normalize(NULL, purple_account_get_username(account)), who))
continue;
if (protocol_id && strcmp(purple_account_get_protocol_id(account), protocol_id))
continue;
if (account_test && !account_test(account))
continue;
result = account;
break;
}
g_free(who);
return result;
}
PurpleAccount *purple_accounts_find_any(const char *name, const char *protocol)
{
return purple_accounts_find_ext(name, protocol, NULL);
}
PurpleAccount *purple_accounts_find_connected(const char *name, const char *protocol)
{
return purple_accounts_find_ext(name, protocol, purple_account_is_connected);
}