beautify error messages

don't print the error number - we print the error string anyway, so it
adds no value.
add some whitespace to the messages as well.
This commit is contained in:
Oswald Buddenhagen 2010-04-05 13:08:17 +02:00
parent db2bbbfef8
commit 122e09fe60

View File

@ -362,12 +362,12 @@ socket_perror( const char *func, Socket_t *sock, int ret )
if (ret == 0) if (ret == 0)
error( "SSL_%s: got EOF\n", func ); error( "SSL_%s: got EOF\n", func );
else else
error( "SSL_%s:%d:%s\n", func, errno, strerror(errno) ); error( "SSL_%s: %s\n", func, strerror(errno) );
} else } else
error( "SSL_%s:%d:%s\n", func, err, ERR_error_string( err, 0 ) ); error( "SSL_%s: %s\n", func, ERR_error_string( err, 0 ) );
return; return;
default: default:
error( "SSL_%s:%d:unhandled SSL error\n", func, err ); error( "SSL_%s: unhandled SSL error %d\n", func, err );
break; break;
} }
return; return;