2008-10-02 [colin] 3.5.0cvs144
[claws.git] / src / common / session.c
index 783135bb40c09c66444461a510af682ba3ba8447..cae294a84666f93f2d69146f3bb8e25794dc9af6 100644 (file)
@@ -136,12 +136,12 @@ gint session_connect(Session *session, const gchar *server, gushort port)
        session->port = port;
 
        sock = sock_connect(server, port);
        session->port = port;
 
        sock = sock_connect(server, port);
-       sock->is_smtp = session->is_smtp;
        if (sock == NULL) {
                g_warning("can't connect to server.");
                session_close(session);
                return -1;
        }
        if (sock == NULL) {
                g_warning("can't connect to server.");
                session_close(session);
                return -1;
        }
+       sock->is_smtp = session->is_smtp;
 
        return session_connect_cb(sock, session);
 #endif
 
        return session_connect_cb(sock, session);
 #endif