]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Improve documentation of gnutls_record_send()
authorMichael Catanzaro <mcatanzaro@igalia.com>
Fri, 26 Jul 2019 16:18:07 +0000 (11:18 -0500)
committerMichael Catanzaro <mcatanzaro@igalia.com>
Fri, 26 Jul 2019 16:19:43 +0000 (11:19 -0500)
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>
lib/record.c

index e17bebacdfbaa2622534495e757580950dd1ec07..39d2a16be2d7523ea206d00e12b744f2e95df1d2 100644 (file)
@@ -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