How to substitute gnutls_record_check_corked

Heiko Schlittermann <[email protected]> Thu, 27 Feb 2020 11:02:35 +0100
Newsgroups gmane.network.gnutls.general
Organization schlittermann -- internet & unix support
Message-ID <[email protected]>
Hi,

Exim uses gnutls_record_cork() and …_uncork(). After uncorking I'd like
to wait until all data is flushed. Currently I do

  do {
    do outbytes = gnutls_record_uncork(state->session, 0);
    while (outbytes == GNUTLS_E_AGAIN);

     if (outbytes < 0)
       {
       ... /* return failure to the caller */
       return -1;
       }
  } while (gnutls_record_check_corked(state->session) > 0);


But GnuTLS < 3.2.8 does not have the gnutls_record_check_corked()
function. My naive attempt to define it according to that what I found
in the recent GnuTLS source failed, as it needs to access internal
data structures (I believe).

What is the proper way do wait until all data is flushed?

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -

_______________________________________________
Gnutls-help mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnutls-help
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEE0L/WueylaUpvFJ3Or0zGdqa2wUIFAl5Xk7oACgkQr0zGdqa2
wUKCfwf/TM8lzVzdbmH8xbpPjG+SD/ledVBaSmaJjRlE6unO9Svcwr4GQ11AIVEs
D9CKwHACh9X76F+9zxCBY9OpaXdinMBBEY1rPX8yT8G34a3amQ5MsOAbuRRdfDj8
AXO63ijaxD2R9+Pv7OCg2Ixr5HwTmh07P46tpp96LAE2R9jPM2JiQd8y1DrGoAAJ
gvsJBx+RvmUJqWijhYr8hPCqPlZtIfyaMdzdKVP/qc7O+zECHkGDxOFq2cDHQ1LH
SGlYJWiURWA3YdnCOjzMgn/dd6ewaDd3UxgbhKRrW96BBq2Qs11K7hDdLGrWE2HK
Wqf071dfWbU3WejVRweQZ7IbxJpw1w==
=JVb3
-----END PGP SIGNATURE-----