]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
More errno discussion regarding push/pull functions.
authorSimon Josefsson <simon@josefsson.org>
Tue, 7 Nov 2006 10:35:21 +0000 (10:35 +0000)
committerSimon Josefsson <simon@josefsson.org>
Tue, 7 Nov 2006 10:35:21 +0000 (10:35 +0000)
doc/gnutls.texi

index 57447a9760b35efff37bec6a15643867b811b7b6..ac42a8c4e9dcafbf513d08652676728211324e7d 100644 (file)
@@ -372,17 +372,24 @@ required callbacks to access the transport layer.
 @item @ref{gnutls_transport_set_pull_function}
 @item @ref{gnutls_transport_set_ptr}
 @item @ref{gnutls_transport_set_lowat}
+@item @ref{gnutls_transport_set_errno}
 @end itemize
 
 These functions accept a callback function as a parameter.  The
 callback functions should return the number of bytes written, or -1 on
 error and should set @code{errno} appropriately.
 
+In some environments, setting @code{errno} is unreliable, for example
+Windows have several errno variables in different CRTs, or it may be
+that errno is not a thread-local variable.  If this is a concern to
+you, call @code{gnutls_transport_set_errno} with the intended errno
+value instead of setting @code{errno} directly.
+
 @acronym{GnuTLS} currently only interprets the EINTR and EAGAIN errno
 values and returns the corresponding @acronym{GnuTLS} error codes
 @code{GNUTLS_E_INTERRUPTED} and @code{GNUTLS_E_AGAIN}.  These values
 are usually returned by interrupted system calls, or when non blocking
-IO is used. All @acronym{GnuTLS} functions can be resumed (called
+IO is used.  All @acronym{GnuTLS} functions can be resumed (called
 again), if any of these error codes is returned.  The error codes
 above refer to the system call, not the @acronym{GnuTLS} function,
 since signals do not interrupt @acronym{GnuTLS}' functions.