diff options
| author | Juanma Barranquero | 2006-11-30 21:58:53 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-11-30 21:58:53 +0000 |
| commit | 9219db75bfd2185408cfe4fea6fef0a424b853b4 (patch) | |
| tree | 812b15186ffd32b0cd1be8785fa041bb7193182f /lib-src/emacsclient.c | |
| parent | 690a8c05b7be8ca6bf66e923f4b707a93e6ba38c (diff) | |
| download | emacs-9219db75bfd2185408cfe4fea6fef0a424b853b4.tar.gz emacs-9219db75bfd2185408cfe4fea6fef0a424b853b4.zip | |
(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.
Diffstat (limited to 'lib-src/emacsclient.c')
| -rw-r--r-- | lib-src/emacsclient.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 6970c1ab9a4..5985a98c39a 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -193,7 +193,12 @@ message (int is_error, char *message, ...) | |||
| 193 | } | 193 | } |
| 194 | else | 194 | else |
| 195 | #endif | 195 | #endif |
| 196 | fprintf (is_error ? stderr : stdout, msg); | 196 | { |
| 197 | FILE *f = is_error ? stderr : stdout; | ||
| 198 | |||
| 199 | fputs (msg, f); | ||
| 200 | fflush (f); | ||
| 201 | } | ||
| 197 | } | 202 | } |
| 198 | 203 | ||
| 199 | /* Decode the options from argv and argc. | 204 | /* Decode the options from argv and argc. |
| @@ -589,7 +594,7 @@ set_tcp_socket () | |||
| 589 | return INVALID_SOCKET; | 594 | return INVALID_SOCKET; |
| 590 | 595 | ||
| 591 | if (server.sin_addr.s_addr != inet_addr ("127.0.0.1")) | 596 | if (server.sin_addr.s_addr != inet_addr ("127.0.0.1")) |
| 592 | message (TRUE, "%s: connected to remote socket at %s\n", | 597 | message (FALSE, "%s: connected to remote socket at %s\n", |
| 593 | progname, inet_ntoa (server.sin_addr)); | 598 | progname, inet_ntoa (server.sin_addr)); |
| 594 | 599 | ||
| 595 | /* | 600 | /* |