(message): Make sure the message is properly written even if it contains printf
escapes, and flush the result. (set_tcp_socket): Make the message for non-local connections informational rather than an error.
This commit is contained in:
parent
690a8c05b7
commit
9219db75bf
1 changed files with 7 additions and 2 deletions
|
@ -193,7 +193,12 @@ message (int is_error, char *message, ...)
|
|||
}
|
||||
else
|
||||
#endif
|
||||
fprintf (is_error ? stderr : stdout, msg);
|
||||
{
|
||||
FILE *f = is_error ? stderr : stdout;
|
||||
|
||||
fputs (msg, f);
|
||||
fflush (f);
|
||||
}
|
||||
}
|
||||
|
||||
/* Decode the options from argv and argc.
|
||||
|
@ -589,7 +594,7 @@ set_tcp_socket ()
|
|||
return INVALID_SOCKET;
|
||||
|
||||
if (server.sin_addr.s_addr != inet_addr ("127.0.0.1"))
|
||||
message (TRUE, "%s: connected to remote socket at %s\n",
|
||||
message (FALSE, "%s: connected to remote socket at %s\n",
|
||||
progname, inet_ntoa (server.sin_addr));
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue