From: Jonathan Bastien-Filiatrault Date: Sun, 9 Aug 2009 19:48:38 +0000 (-0400) Subject: Cleanup of the remaining internals.record_send_buffer mess. X-Git-Tag: gnutls_2_11_3~326 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ef62950845f551ebc629e50d5ddf75f71b84294;p=thirdparty%2Fgnutls.git Cleanup of the remaining internals.record_send_buffer mess. --- diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 350285b213..d9a8d9245c 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -605,13 +605,6 @@ typedef struct * for the gnutls_io_write_buffered() * function. */ - size_t record_send_buffer_prev_size; /* holds the - * data written in the previous runs. - */ - size_t record_send_buffer_user_size; /* holds the - * size of the user specified data to - * send. - */ /* 0 if no peeked data was kept, 1 otherwise. */ diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index b97b6579c3..19e0cecc49 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -347,7 +347,7 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, * If the previous send was interrupted then a null pointer is * ok, and means to resume. */ - if (session->internals.record_send_buffer.length == 0 && + if (session->internals.record_send_buffer.byte_length == 0 && (sizeofdata == 0 && _data == NULL)) { gnutls_assert (); @@ -383,7 +383,7 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, /* Only encrypt if we don't have data to send * from the previous run. - probably interrupted. */ - if (session->internals.record_send_buffer.length > 0) + if (session->internals.record_send_buffer.byte_length > 0) { ret = _gnutls_io_write_flush (session); if (ret > 0) @@ -393,7 +393,7 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, cipher = NULL; - retval = session->internals.record_send_buffer_user_size; + retval = session->internals.record_send_buffer.byte_length; } else { @@ -423,7 +423,6 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, } retval = data2send_size; - session->internals.record_send_buffer_user_size = data2send_size; /* increase sequence number */ @@ -462,8 +461,6 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, return ret; } - session->internals.record_send_buffer_user_size = 0; - _gnutls_record_log ("REC[%p]: Sent Packet[%d] %s(%d) with length: %d\n", session, (int)