Mercurial > pidgin
changeset 10909:bd6c0aa9ff6c
[gaim-migrate @ 12642]
Prevent the auto-reconnect plugin from trying to reconnect if there was a
problem initializing SILC or loading the keypair, and fix loading the
keypair to use the correct default names so people who are using a default
config will have a better chance of migrating from a pre-1.3.0 SILC account
(the potential for losing the buddy list remains, but strangely I didn't
lose mine).
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 09 May 2005 20:46:30 +0000 |
parents | 0317ad172e8d |
children | d8b0b9c5ffd7 |
files | src/protocols/silc/silc.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/silc/silc.c Mon May 09 12:43:52 2005 +0000 +++ b/src/protocols/silc/silc.c Mon May 09 20:46:30 2005 +0000 @@ -302,12 +302,14 @@ /* Init SILC client */ if (!silc_client_init(client)) { + gc->wants_to_die = TRUE; gaim_connection_error(gc, ("Cannot initialize SILC protocol")); return; } /* Check the ~/.silc dir and create it, and new key pair if necessary. */ if (!silcgaim_check_silc_dir(gc)) { + gc->wants_to_die = TRUE; gaim_connection_error(gc, ("Cannot find/access ~/.silc directory")); return; } @@ -316,9 +318,9 @@ gaim_connection_update_progress(gc, _("Connecting to SILC Server"), 1, 5); /* Load SILC key pair */ - g_snprintf(pkd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcgaim_silcdir()); - g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.pub", silcgaim_silcdir()); - if (!silc_load_key_pair((char *)gaim_account_get_string(account, "public-key", prd), + g_snprintf(pkd, sizeof(pkd), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcgaim_silcdir()); + g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcgaim_silcdir()); + if (!silc_load_key_pair((char *)gaim_account_get_string(account, "public-key", pkd), (char *)gaim_account_get_string(account, "private-key", prd), (gc->password == NULL) ? "" : gc->password, &client->pkcs, &client->public_key, &client->private_key)) {