summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-04-13 20:45:20 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-04-13 20:52:05 +0200
commit8ef6686a00218dca0f93c47b1e1f7764c9251c19 (patch)
tree44859fdbc1f921df10af6b8fc755de069aa72077
parent300a55eb94d9ff7ab45916a2422e2495d4caccac (diff)
downloadgnutls-8ef6686a00218dca0f93c47b1e1f7764c9251c19.tar.gz
gnutls_record_check_unprocessed is now inline function.
-rw-r--r--NEWS4
-rw-r--r--lib/gnutls_buffers.c16
-rw-r--r--lib/gnutls_buffers.h16
-rw-r--r--lib/gnutls_handshake.c4
-rw-r--r--lib/includes/gnutls/gnutls.h.in1
5 files changed, 19 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index fb1b7c21e8..d382a6a1da 100644
--- a/NEWS
+++ b/NEWS
@@ -6,9 +6,7 @@ See the end for copying conditions.
** libgnutls: gnutls_record_check_pending() no longer
returns unprocessed data, and thus ensure the non-blocking
-of the next call to gnutls_record_recv(). To compensate
-for unprocessed data, the gnutls_record_check_unprocessed()
-was added.
+of the next call to gnutls_record_recv().
** libgnutls: in ECDSA and DSA TLS 1.2 authentication be less
strict in hash selection, and allow a stronger hash to
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index a7c00cad92..d1c2693c01 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -96,22 +96,6 @@ gnutls_record_check_pending (gnutls_session_t session)
return _gnutls_record_buffer_get_size (session);
}
-/**
- * gnutls_record_check_unprocessed:
- * @session: is a #gnutls_session_t structure.
- *
- * This function checks if there are unprocessed data
- * in the gnutls record buffers. Those data might not
- * be complete records.
- *
- * Returns: Returns the size of the data or zero.
- **/
-size_t
-gnutls_record_check_unprocessed (gnutls_session_t session)
-{
- return session->internals.record_recv_buffer.byte_length;
-}
-
int
_gnutls_record_buffer_get (content_type_t type,
gnutls_session_t session, uint8_t * data,
diff --git a/lib/gnutls_buffers.h b/lib/gnutls_buffers.h
index a34cc00f3e..04a89eb219 100644
--- a/lib/gnutls_buffers.h
+++ b/lib/gnutls_buffers.h
@@ -34,6 +34,22 @@ _gnutls_record_buffer_get_size (gnutls_session_t session)
return session->internals.record_buffer.byte_length;
}
+/*-
+ * record_check_unprocessed:
+ * @session: is a #gnutls_session_t structure.
+ *
+ * This function checks if there are unprocessed data
+ * in the gnutls record buffers. Those data might not
+ * be complete records.
+ *
+ * Returns: Returns the size of the data or zero.
+ -*/
+inline static size_t
+record_check_unprocessed (gnutls_session_t session)
+{
+ return session->internals.record_recv_buffer.byte_length;
+}
+
int _gnutls_record_buffer_get (content_type_t type,
gnutls_session_t session, uint8_t * data,
size_t length, uint8_t seq[8]);
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 8dc3264ce2..25520c40b6 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2682,7 +2682,7 @@ _gnutls_recv_handshake_final (gnutls_session_t session, int init)
* wait for a message and retransmit if needed. */
if (IS_DTLS(session) && !_dtls_is_async(session) &&
(gnutls_record_check_pending (session) +
- gnutls_record_check_unprocessed (session)) == 0)
+ record_check_unprocessed (session)) == 0)
{
ret = _dtls_wait_and_retransmit(session);
if (ret < 0)
@@ -2720,7 +2720,7 @@ _gnutls_recv_handshake_final (gnutls_session_t session, int init)
if (IS_DTLS(session) && !_dtls_is_async(session) &&
(gnutls_record_check_pending( session) +
- gnutls_record_check_unprocessed (session)) == 0)
+ record_check_unprocessed (session)) == 0)
{
ret = _dtls_wait_and_retransmit(session);
if (ret < 0)
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index be85dc96e9..035f63857a 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -857,7 +857,6 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session);
ssize_t gnutls_record_set_max_size (gnutls_session_t session, size_t size);
size_t gnutls_record_check_pending (gnutls_session_t session);
- size_t gnutls_record_check_unprocessed (gnutls_session_t session);
int gnutls_prf (gnutls_session_t session,
size_t label_size, const char *label,