mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Improve output with bad setups (non-existing local proxy or remote non-proxy servers)
git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@137 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
parent
fc95112e19
commit
e6893458fe
3 changed files with 27 additions and 19 deletions
|
|
@ -47,7 +47,10 @@ void message( char *s, ... )
|
|||
*/
|
||||
void my_perror( char *msg )
|
||||
{
|
||||
char *err = strerror( errno );
|
||||
|
||||
message( "Error! %s: %s\n", msg, err );
|
||||
if (errno == 0) {
|
||||
message( "error: %s.\n", msg );
|
||||
} else {
|
||||
char *errstr = strerror( errno );
|
||||
message( "error: %s: [%d] %s\n", msg, errno, errstr );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue