mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Keep errstr set to NULL if errno is not set
Don't use errno if it is not set and show the default error message instead. This prevents messages like "SSL handshake failed: Success" from being shown.
This commit is contained in:
parent
b382bd1232
commit
4f45828ff3
1 changed files with 1 additions and 1 deletions
|
|
@ -842,7 +842,7 @@ int irssi_ssl_handshake(GIOChannel *handle)
|
|||
return -1;
|
||||
case SSL_ERROR_SYSCALL:
|
||||
errstr = ERR_reason_error_string(ERR_get_error());
|
||||
if (errstr == NULL && ret == -1)
|
||||
if (errstr == NULL && ret == -1 && errno)
|
||||
errstr = strerror(errno);
|
||||
g_warning("SSL handshake failed: %s", errstr != NULL ? errstr : "server closed connection unexpectedly");
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue