# HG changeset patch # User Juanma Barranquero # Date 1164923933 0 # Node ID 32079f79e240cfdcb786c6fd4ac9ff1835dbe636 # Parent ba613bb7aa38c8e6b6f32adf1a4bdd844784afb1 (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. diff -r ba613bb7aa38 -r 32079f79e240 lib-src/emacsclient.c --- a/lib-src/emacsclient.c Thu Nov 30 21:00:32 2006 +0000 +++ b/lib-src/emacsclient.c Thu Nov 30 21:58:53 2006 +0000 @@ -193,7 +193,12 @@ } 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 @@ 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)); /*