]> granicus.if.org Git - curl/commitdiff
gnutls: put reset code into else block
authorAlessandro Ghedini <al3xbio@gmail.com>
Mon, 15 Oct 2012 14:06:54 +0000 (16:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 15 Oct 2012 22:18:44 +0000 (00:18 +0200)
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690551

lib/gtls.c

index 3b4dc40a3479f217679b93f4a6e255e4449105b0..f5f95aef8ffc88119d7ac9db3e459cf530aea1b4 100644 (file)
@@ -309,10 +309,11 @@ static CURLcode handshake(struct connectdata *conn,
       failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc));
       return CURLE_SSL_CONNECT_ERROR;
     }
-
-    /* Reset our connect state machine */
-    connssl->connecting_state = ssl_connect_1;
-    return CURLE_OK;
+    else {
+      /* Reset our connect state machine */
+      connssl->connecting_state = ssl_connect_1;
+      return CURLE_OK;
+    }
   }
 }