Mercurial > pidgin.yaz
comparison libpurple/protocols/silc/silc.c @ 20816:efa448405f3d
Remove explicit setting of wants_to_die from prpls.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 09 Oct 2007 13:42:15 +0000 |
parents | 8174f6999308 |
children | ba41f2a60253 |
comparison
equal
deleted
inserted
replaced
20815:7a7b3a425666 | 20816:efa448405f3d |
---|---|
227 _("Error during connecting to SILC Server")); | 227 _("Error during connecting to SILC Server")); |
228 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); | 228 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); |
229 break; | 229 break; |
230 | 230 |
231 case SILC_CLIENT_CONN_ERROR_KE: | 231 case SILC_CLIENT_CONN_ERROR_KE: |
232 gc->wants_to_die = TRUE; | |
233 purple_connection_error_reason(gc, PURPLE_REASON_ENCRYPTION_ERROR, | 232 purple_connection_error_reason(gc, PURPLE_REASON_ENCRYPTION_ERROR, |
234 _("Key Exchange failed")); | 233 _("Key Exchange failed")); |
235 break; | 234 break; |
236 | 235 |
237 case SILC_CLIENT_CONN_ERROR_AUTH: | 236 case SILC_CLIENT_CONN_ERROR_AUTH: |
238 gc->wants_to_die = TRUE; | |
239 purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, | 237 purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, |
240 _("Authentication failed")); | 238 _("Authentication failed")); |
241 break; | 239 break; |
242 | 240 |
243 case SILC_CLIENT_CONN_ERROR_RESUME: | 241 case SILC_CLIENT_CONN_ERROR_RESUME: |
244 gc->wants_to_die = TRUE; | |
245 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, | 242 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, |
246 _("Resuming detached session failed. " | 243 _("Resuming detached session failed. " |
247 "Press Reconnect to create new connection.")); | 244 "Press Reconnect to create new connection.")); |
248 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); | 245 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); |
249 break; | 246 break; |
358 g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir()); | 355 g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir()); |
359 if (!silc_load_key_pair((char *)purple_account_get_string(account, "public-key", pkd), | 356 if (!silc_load_key_pair((char *)purple_account_get_string(account, "public-key", pkd), |
360 (char *)purple_account_get_string(account, "private-key", prd), | 357 (char *)purple_account_get_string(account, "private-key", prd), |
361 (gc->password == NULL) ? "" : gc->password, | 358 (gc->password == NULL) ? "" : gc->password, |
362 &sg->public_key, &sg->private_key)) { | 359 &sg->public_key, &sg->private_key)) { |
363 gc->wants_to_die = TRUE; | |
364 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, | 360 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, |
365 _("Could not load SILC key pair")); | 361 _("Could not load SILC key pair")); |
366 gc->proto_data = NULL; | 362 gc->proto_data = NULL; |
367 silc_free(sg); | 363 silc_free(sg); |
368 return; | 364 return; |
446 } | 442 } |
447 | 443 |
448 /* Init SILC client */ | 444 /* Init SILC client */ |
449 if (!silc_client_init(client, username, hostname, realname, | 445 if (!silc_client_init(client, username, hostname, realname, |
450 silcpurple_running, account)) { | 446 silcpurple_running, account)) { |
451 gc->wants_to_die = TRUE; | |
452 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, | 447 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, |
453 _("Cannot initialize SILC protocol")); | 448 _("Cannot initialize SILC protocol")); |
454 return; | 449 return; |
455 } | 450 } |
456 | 451 |
457 /* Check the ~/.silc dir and create it, and new key pair if necessary. */ | 452 /* Check the ~/.silc dir and create it, and new key pair if necessary. */ |
458 if (!silcpurple_check_silc_dir(gc)) { | 453 if (!silcpurple_check_silc_dir(gc)) { |
459 gc->wants_to_die = TRUE; | |
460 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, | 454 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, |
461 _("Error loading SILC key pair")); | 455 _("Error loading SILC key pair")); |
462 return; | 456 return; |
463 } | 457 } |
464 | 458 |