[gnutls-devel] GnuTLS | ktls: sendfile (!1486)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Sun Feb 20 18:17:34 CET 2022
Daiki Ueno commented on a discussion on lib/record.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1486#note_849106515
> + size_t buf_len, data_to_send;
> + size_t send = 0;
> + char *buf;
> +
> + if (IS_KTLS_ENABLED(session, GNUTLS_KTLS_SEND)) {
> + return _gnutls_ktls_send_file(session, fd, offset, count);
> + }
> +
> + if (offset != NULL)
> + if (lseek(fd, *offset, SEEK_SET) == -1)
> + return GNUTLS_E_FILE_ERROR;
> +
> + buf_len = MAX_RECORD_SEND_SIZE(session);
> + if (count < buf_len)
> + buf_len = count;
> + else if (buf_len <= 0)
Also consider using `max_record_send_size` instead (see #815).
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1486#note_849106515
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220220/8f62df62/attachment.html>
More information about the Gnutls-devel
mailing list