<!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=utf-8" 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: #777777;">
<a href="https://gitlab.com/Vrancken">Tom</a>
commented on a discussion
on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/777#note_113096274">lib/priority.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="598" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
598
</td>
<td class="diff-line-num new_line" data-linenumber="598" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
598
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC598" class="line" lang="c">            <span class="p">}</span></span>
</pre>
</td>
</tr>

</table>
<div>
<p dir="auto">It's about line 597. I think this part is reachable when you use this function to set priorities for the first time. If the <code>_gnutls_set_current_version()</code> function fails then now you get an <code>GNUTLS_E_NO_PRIORITIES_WERE_SET</code> error code back. This is imo not the correct error code here because there were priorities set. Therefore I would suggest to return the error code that <code>_gnutls_set_current_version()</code> returns.</p>
<p dir="auto">Furthermore, I think the function documentation is currently not correct since we do not return any error if someone calls this function again with incorrect priorities (i.e. different proto version). In the current implementation we simply do not (re)set a new protocol version if the handshake is in progress or if it has been completed. The rest of the priorities will be changed to the new ones given in that case and 0 will be returned.</p>
<p dir="auto">We should therefore either update the docs or return an error code if someone whats to change the protocol version.</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/merge_requests/777#note_113096274">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/c1f6f843602eed6faf2e1704177a233f/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 Merge request","url":"https://gitlab.com/gnutls/gnutls/merge_requests/777#note_113096274"}}</script>
</p>
</div>
</body>
</html>