fix indent (broken in last commit)
[claws.git] / src / common / session.c
index 25038c98fb1d3916e492fb0f9b2044130442ce33..959c7a28e6785e6956dd765c893df4476fe371ad 100644 (file)
@@ -165,6 +165,8 @@ static gint session_connect_cb(SockInfo *sock, gpointer data)
        session->sock = sock;
        sock->account = session->account;
        sock->is_smtp = session->is_smtp;
+       sock->ssl_cert_auto_accept = session->ssl_cert_auto_accept;
+
 #ifdef USE_GNUTLS
        sock->gnutls_priority = session->gnutls_priority;
 
@@ -262,14 +264,12 @@ void session_set_timeout(Session *session, guint interval)
 
        session->timeout_interval = interval;
        if (interval > 0) {
-#if GLIB_CHECK_VERSION(2,14,0)
                if (interval % 1000 == 0)
                        session->timeout_tag =
                                g_timeout_add_seconds(interval/1000, session_timeout_cb, session);
                else
-#endif
-               session->timeout_tag =
-                       g_timeout_add(interval, session_timeout_cb, session);
+                       session->timeout_tag =
+                               g_timeout_add(interval, session_timeout_cb, session);
        } else
                session->timeout_tag = 0;
 }
@@ -373,6 +373,8 @@ gint session_start_tls(Session *session)
 
        nb_mode = sock_is_nonblocking_mode(session->sock);
 
+       session->sock->ssl_cert_auto_accept = session->ssl_cert_auto_accept;
+
        if (nb_mode)
                sock_set_nonblocking_mode(session->sock, FALSE);
 
@@ -888,11 +890,5 @@ void session_register_ping(Session *session, gboolean (*ping_cb)(gpointer data))
        session->ping_tag = -1;
 
        if (ping_cb != NULL)
-#if GLIB_CHECK_VERSION(2,14,0)
-               session->ping_tag =
-                       g_timeout_add_seconds(60, ping_cb, session);
-#else
-               session->ping_tag =
-                       g_timeout_add(60*1000, ping_cb, session);
-#endif
+               session->ping_tag = g_timeout_add_seconds(60, ping_cb, session);
 }