static gint lock_socket = -1;
static gint lock_socket_tag = 0;
+#if USE_SSL
+SSL_CTX *ssl_ctx;
+#endif
+
static struct Cmd {
gboolean receive;
gboolean receive_all;
MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir());
MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir());
+ if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log")) {
+ if (rename(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log",
+ RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0)
+ FILE_OP_ERROR("sylpheed.log", "rename");
+ }
+ set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log");
+
if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "assortrc") &&
!is_file_exist(RC_DIR G_DIR_SEPARATOR_S "filterrc")) {
if (rename(RC_DIR G_DIR_SEPARATOR_S "assortrc",
gpgme_register_idle(idle_function_for_gpgme);
#endif
+#if USE_SSL
+ {
+ SSL_METHOD *meth;
+
+ SSLeay_add_ssl_algorithms();
+ meth = SSLv2_client_method();
+ SSL_load_error_strings();
+ ssl_ctx = SSL_CTX_new(meth);
+ if(ssl_ctx == NULL) {
+ debug_print(_("SSL disabled\n"));
+ } else {
+ debug_print(_("SSL loaded: \n"));
+ }
+ }
+#endif
+
prefs_common_save_config();
prefs_filter_read_config();
prefs_filter_write_config();
gtk_main();
+#if USE_SSL
+ if(ssl_ctx) {
+ SSL_CTX_free(ssl_ctx);
+ }
+#endif
+
return 0;
}
/* delete temporary files */
remove_all_files(get_mime_tmp_dir());
+ close_log_file();
+
/* delete unix domain socket */
gdk_input_remove(lock_socket_tag);
fd_close(lock_socket);