# HG changeset patch # User Stu Tomlinson # Date 1115671590 0 # Node ID bd6c0aa9ff6c5c0b1b2a5e3c6336c071c587b844 # Parent 0317ad172e8da03dc468c6afdb0404612b73e90a [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 diff -r 0317ad172e8d -r bd6c0aa9ff6c src/protocols/silc/silc.c --- 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)) {