* Version 3.0.19 (unreleased)
+** 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.
+
** tests: Disabled floating point test, and corrections
in pkcs12 decoding tests.
** API and ABI modifications:
-No changes since last version.
-
+gnutls_record_check_unprocessed: Added
* Version 3.0.18 (released 2012-04-02)
size_t
gnutls_record_check_pending (gnutls_session_t session)
{
- return _gnutls_record_buffer_get_size (session) + session->internals.record_recv_buffer.byte_length;
+ 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
* we have received it unless we notify him. So we
* wait for a message and retransmit if needed. */
if (IS_DTLS(session) && !_dtls_is_async(session) &&
- gnutls_record_check_pending (session) == 0)
+ (gnutls_record_check_pending (session) +
+ gnutls_record_check_unprocessed (session)) == 0)
{
ret = _dtls_wait_and_retransmit(session);
if (ret < 0)
STATE = STATE31;
if (IS_DTLS(session) && !_dtls_is_async(session) &&
- gnutls_record_check_pending( session) == 0)
+ (gnutls_record_check_pending( session) +
+ gnutls_record_check_unprocessed (session)) == 0)
{
ret = _dtls_wait_and_retransmit(session);
if (ret < 0)
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,