Fixes for the renego-option merge
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index 6621faa..dc80ed0 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -1345,7 +1345,12 @@
     msg_len = ( ssl->in_len[0] << 8 ) | ssl->in_len[1];
 
 #if defined(POLARSSL_SSL_RENEGOTIATION)
-    if( ssl->renegotiation == SSL_INITIAL_HANDSHAKE )
+    if( ssl->renegotiation != SSL_INITIAL_HANDSHAKE )
+    {
+        /* Set by ssl_read_record() */
+        msg_len = ssl->in_hslen;
+    }
+    else
 #endif
     {
         if( msg_len > SSL_MAX_CONTENT_LEN )
@@ -1368,11 +1373,6 @@
 #endif
             ssl->in_left = 0;
     }
-    else
-    {
-        /* Set by ssl_read_record() */
-        msg_len = ssl->in_hslen;
-    }
 
     buf = ssl->in_msg;