mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
yet more debug info
This commit is contained in:
parent
562ee46118
commit
3bc0a58531
1 changed files with 7 additions and 3 deletions
|
@ -450,18 +450,22 @@ GSTLSPush(gnutls_transport_ptr_t handle, const void *buffer, size_t len)
|
||||||
if ([[tls ostream] streamStatus] == NSStreamStatusError)
|
if ([[tls ostream] streamStatus] == NSStreamStatusError)
|
||||||
{
|
{
|
||||||
e = [[[tls ostream] streamError] code];
|
e = [[[tls ostream] streamError] code];
|
||||||
|
NSDebugFLLog(@"NSStream",
|
||||||
|
@"GSTLSPush write for %p error %d (%s)",
|
||||||
|
[tls ostream], e, strerror(e));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e = EAGAIN; // Tell GNUTLS this would block.
|
e = EAGAIN; // Tell GNUTLS this would block.
|
||||||
|
NSDebugFLLog(@"NSStream",
|
||||||
|
@"GSTLSPush write for %p of %lu would block",
|
||||||
|
[tls ostream], (unsigned long)len);
|
||||||
}
|
}
|
||||||
#if HAVE_GNUTLS_TRANSPORT_SET_ERRNO
|
#if HAVE_GNUTLS_TRANSPORT_SET_ERRNO
|
||||||
gnutls_transport_set_errno(tls->session->session, e);
|
gnutls_transport_set_errno(tls->session->session, e);
|
||||||
#else
|
#else
|
||||||
errno = e; // Not thread-safe
|
errno = e; // Not thread-safe
|
||||||
#endif
|
#endif
|
||||||
NSDebugFLLog(@"NSStream", @"GSTLSPush write for %p error %d (%s)",
|
|
||||||
[tls ostream], e, strerror(e));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (len != result)
|
if (len != result)
|
||||||
|
@ -471,7 +475,7 @@ GSTLSPush(gnutls_transport_ptr_t handle, const void *buffer, size_t len)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSDebugFLLog(@"NSStream", @"GSTLSPush write for %p of %ld",
|
NSDebugFLLog(@"NSStream", @"GSTLSPush write for %p of %ld success",
|
||||||
[tls ostream], (long)result);
|
[tls ostream], (long)result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue