Mercurial > pidgin
diff src/account.c @ 7132:d17a587efeb3
[gaim-migrate @ 7699]
new blist parser code, and some tweaks to the account code to make my next commit possible. the other parser code can get moved over to this model to make things cleaner, but i'm too lazy to do it now.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 03 Oct 2003 21:49:11 +0000 |
parents | bf630f7dfdcd |
children | e6b01bd8d6cd |
line wrap: on
line diff
--- a/src/account.c Fri Oct 03 21:10:12 2003 +0000 +++ b/src/account.c Fri Oct 03 21:49:11 2003 +0000 @@ -128,7 +128,7 @@ g_return_val_if_fail(username != NULL, NULL); if(protocol_id) - account = gaim_accounts_find_with_prpl_id(username, protocol_id); + account = gaim_accounts_find(username, protocol_id); if (account != NULL) return account; @@ -1517,8 +1517,8 @@ return accounts; } -GaimAccount * -gaim_accounts_find(const char *name, GaimProtocol protocol) +static GaimAccount * +gaim_accounts_find_with_prpl_num(const char *name, GaimProtocol protocol) { GaimAccount *account = NULL; GList *l; @@ -1549,7 +1549,7 @@ } GaimAccount * -gaim_accounts_find_with_prpl_id(const char *name, const char *protocol_id) +gaim_accounts_find(const char *name, const char *protocol_id) { GaimAccount *account = NULL; GList *l; @@ -1563,7 +1563,7 @@ account = (GaimAccount *)l->data; if (!strcmp(gaim_normalize(gaim_account_get_username(account)), who) && - !strcmp(account->protocol_id, protocol_id)) { + (!protocol_id || !strcmp(account->protocol_id, protocol_id))) { break; } @@ -1571,6 +1571,9 @@ account = NULL; } + if(!account && protocol_id) + account = gaim_accounts_find_with_prpl_num(name, atoi(protocol_id)); + g_free(who); return account;