From 57c45c620f97e0db81b83754214267f689932d0e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 8 May 2019 08:26:09 +0100 Subject: [PATCH] Uppity: print a startup message. When I start Uppity in listening mode, it's useful to have it acknowledge that it _has_ started up in that mode, and isn't (for example) stuck somewhere in my local wrapper script. --- unix/uxserver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unix/uxserver.c b/unix/uxserver.c index e6875edd..8fdc138f 100644 --- a/unix/uxserver.c +++ b/unix/uxserver.c @@ -821,9 +821,16 @@ int main(int argc, char **argv) scfg.listening_plug.vt = &server_plugvt; scfg.listening_socket = sk_newlistener( NULL, listen_port, &scfg.listening_plug, true, ADDRTYPE_UNSPEC); + + char *msg = dupprintf("%s: listening on port %d", + appname, listen_port); + log_to_stderr(-1, msg); + sfree(msg); } else { - Plug *plug = server_conn_plug(&scfg, NULL); + struct server_instance *inst; + Plug *plug = server_conn_plug(&scfg, &inst); ssh_server_start(plug, make_fd_socket(0, 1, -1, plug)); + log_to_stderr(inst->id, "speaking SSH on stdio"); } now = GETTICKCOUNT();