<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/TheRealMichaelCatanzaro">Michael Catanzaro</a> created an issue:
</p>
<div></div>
<p dir="auto">The documentation of gnutls_record_send() says:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">If  GNUTLS_E_INTERRUPTED  or</span>
<span id="LC2" class="line" lang="plaintext">GNUTLS_E_AGAIN is returned, you must call this function again, with the</span>
<span id="LC3" class="line" lang="plaintext">exact  same  parameters; alternatively you could provide a NULL pointer</span>
<span id="LC4" class="line" lang="plaintext">for data, and 0 for size. cf. gnutls_record_get_direction().</span></code></pre>
<p dir="auto">But I think this is no longer accurate since gnutls_record_discard_queued() was added. Now you have three choices: call with exact same parameters, call with NULL and 0, or call gnutls_record_discard_queued() and then call gnutls_record_send() with whatever you want. Correct?</p>
<p dir="auto">Proposed revised text:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">If GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN is returned, you must call this</span>
<span id="LC2" class="line" lang="plaintext">function again with the exact same parameters, or provide a NULL pointer</span>
<span id="LC3" class="line" lang="plaintext">for data and 0 for size, in order to write the same data as before. If you</span>
<span id="LC4" class="line" lang="plaintext">wish to discard the previous data instead of retrying, you must call</span>
<span id="LC5" class="line" lang="plaintext">gnutls_record_discard_queued() before calling gnutls_record_send() with</span>
<span id="LC6" class="line" lang="plaintext">different parameters.</span></code></pre>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/806">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/05c68a4c8d89d2a975f2123ef3aefb18/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/806"}}</script>


</p>
</div>
</body>
</html>