diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2024-01-20 02:41:39 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2024-01-20 02:41:39 +0100 |
commit | 82f142c0acc87e55373102687aa718effcbf7cb9 (patch) | |
tree | b8fe3524eb323ebd9cb52734baa8c17203a98ba7 /vchat-client.c | |
parent | c9e63d4003a58f41367fef1f0672756cbb44ddfa (diff) |
Remember lines that were printed during connect so they can be output in case of an error
Diffstat (limited to 'vchat-client.c')
-rw-r--r-- | vchat-client.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) { | |||
343 | /* inform user if we where killed by signal */ | 343 | /* inform user if we where killed by signal */ |
344 | if (signal > 1) { | 344 | if (signal > 1) { |
345 | fprintf(stderr, "vchat-client: terminated with signal %d.\n", signal); | 345 | fprintf(stderr, "vchat-client: terminated with signal %d.\n", signal); |
346 | } else if (errstr[0]) | 346 | if (!loggedin) |
347 | dumpconnect(); | ||
348 | } else if (errstr[0]) { | ||
347 | fputs(errstr, stderr); | 349 | fputs(errstr, stderr); |
350 | if (!loggedin) | ||
351 | dumpconnect(); | ||
352 | } | ||
348 | /* end of story */ | 353 | /* end of story */ |
349 | exit(0); | 354 | exit(0); |
350 | } | 355 | } |