summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2019-07-26 11:18:07 -0500
committerMichael Catanzaro <mcatanzaro@igalia.com>2019-07-26 11:19:43 -0500
commit06b097c5f2bab00a0ce8b49a002cb8a8f968b6fd (patch)
tree1e7d69ce79a9a7a9f009dc80284ba2e422f4377b
parent215854c0a8f49b55e8af398d06a1c9a814bcf445 (diff)
downloadgnutls-06b097c5f2bab00a0ce8b49a002cb8a8f968b6fd.tar.gz
Improve documentation of gnutls_record_send()
It's no longer required to retry this function with the same parameters if you want to use gnutls_record_discard_queued(). Fixes #806 Signed-off-by: Michael Catanzaro <mcatanzaro@igalia.com>
-rw-r--r--lib/record.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/record.c b/lib/record.c
index e17bebacdf..39d2a16be2 100644
--- a/lib/record.c
+++ b/lib/record.c
@@ -1931,9 +1931,12 @@ ssize_t append_data_to_corked(gnutls_session_t session, const void *data, size_t
* If the EINTR is returned by the internal push function
* then %GNUTLS_E_INTERRUPTED will be returned. If
* %GNUTLS_E_INTERRUPTED or %GNUTLS_E_AGAIN is returned, you must
- * call this function again, with the exact same parameters; alternatively
- * you could provide a %NULL pointer for data, and 0 for
- * size. cf. gnutls_record_get_direction().
+ * call this function again with the exact same parameters, or provide a
+ * %NULL pointer for @data and 0 for @data_size, in order to write the
+ * same data as before. If you wish to discard the previous data instead
+ * of retrying, you must call gnutls_record_discard_queued() before
+ * calling this function with different parameters.
+ * cf. gnutls_record_get_direction().
*
* Note that in DTLS this function will return the %GNUTLS_E_LARGE_PACKET
* error code if the send data exceed the data MTU value - as returned