From 06b097c5f2bab00a0ce8b49a002cb8a8f968b6fd Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 26 Jul 2019 11:18:07 -0500 Subject: 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 --- lib/record.c | 9 ++++++--- 1 file 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 -- cgit v1.2.1