gaim/gaim

53e026efe21f
Parents 65a199257efc
Children 531d407bec0a
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).
--- a/src/protocols/silc/silc.c Mon May 09 08:43:36 2005 -0400
+++ b/src/protocols/silc/silc.c Mon May 09 16:46:27 2005 -0400
@@ -277,12 +277,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;
}
@@ -291,9 +293,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),
(account->password == NULL) ? "" : account->password, &client->pkcs,
&client->public_key, &client->private_key)) {