From 82f142c0acc87e55373102687aa718effcbf7cb9 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 20 Jan 2024 02:41:39 +0100 Subject: Remember lines that were printed during connect so they can be output in case of an error --- vchat-client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vchat-client.c') diff --git a/vchat-client.c b/vchat-client.c index a22df94..92d1905 100644 --- a/vchat-client.c +++ b/vchat-client.c @@ -343,8 +343,13 @@ void cleanup(int signal) { /* inform user if we where killed by signal */ if (signal > 1) { fprintf(stderr, "vchat-client: terminated with signal %d.\n", signal); - } else if (errstr[0]) + if (!loggedin) + dumpconnect(); + } else if (errstr[0]) { fputs(errstr, stderr); + if (!loggedin) + dumpconnect(); + } /* end of story */ exit(0); } -- cgit v1.2.3