# HG changeset patch # User Nathan Walp # Date 1057711008 0 # Node ID 6a3b676eb36aa45aeca6308ccca39bedc07b742b # Parent c99959f1bb7378eb143f8f8980dadf808365b678 [gaim-migrate @ 6517] don't lose same-name accounts, and handle the default protocol a little better committer: Tailor Script diff -r c99959f1bb73 -r 6a3b676eb36a src/account.c --- a/src/account.c Wed Jul 09 00:33:06 2003 +0000 +++ b/src/account.c Wed Jul 09 00:36:48 2003 +0000 @@ -116,20 +116,24 @@ GaimAccount * gaim_account_new(const char *username, const char *protocol_id) { - GaimAccount *account; + GaimAccount *account = NULL; g_return_val_if_fail(username != NULL, NULL); - g_return_val_if_fail(protocol_id != NULL, NULL); - account = gaim_accounts_find_with_prpl_id(username, protocol_id); + if(protocol_id) + account = gaim_accounts_find_with_prpl_id(username, protocol_id); if (account != NULL) return account; account = g_new0(GaimAccount, 1); - gaim_account_set_username(account, username); - gaim_account_set_protocol_id(account, protocol_id); + gaim_account_set_username(account, username); + + if(protocol_id) + gaim_account_set_protocol_id(account, protocol_id); + else + gaim_account_set_protocol(account, GAIM_PROTO_DEFAULT); account->settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, delete_setting); diff -r c99959f1bb73 -r 6a3b676eb36a src/gaimrc.c --- a/src/gaimrc.c Wed Jul 09 00:33:06 2003 +0000 +++ b/src/gaimrc.c Wed Jul 09 00:36:48 2003 +0000 @@ -520,7 +520,7 @@ if (strcmp(p->option, "ident")) return NULL; - account = gaim_account_new(p->value[0], "prpl-oscar"); + account = gaim_account_new(p->value[0], NULL); gaim_account_set_password(account, p->value[1]); gaim_account_set_remember_password(account, TRUE);