Commit
2ec84d6 broke this usage of gnutls_record_send. This patch fixes the problem.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
else
send_data_size = data_size;
- if (unlikely(send_data_size == 0))
- return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
-
/* Only encrypt if we don't have data to send
* from the previous run. - probably interrupted.
*/
}
else
{
+ if (unlikely(send_data_size == 0))
+ return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
+
/* now proceed to packet encryption
*/
cipher_size = MAX_RECORD_SEND_SIZE(session);