diff options
author | Dario Lombardo <lomato@gmail.com> | 2018-10-19 17:07:14 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-10-19 20:52:31 +0000 |
commit | 1fdc0f4a6f47b62a2330d676c1ed179d4cc08f2f (patch) | |
tree | 45513dbb31f566cdc8c3b1e0d213745a4d870ac7 /tshark.c | |
parent | 7994111882a6ec6cb12129bb4fdcb4069b5be218 (diff) |
tshark: replace exit with abort in TRY/CATCH.
Change-Id: I3fe6c63fcf179fd10b0b722b2749c68365eb0870
Reviewed-on: https://code.wireshark.org/review/30258
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -2420,7 +2420,7 @@ tshark_epan_new(capture_file *cf) static gboolean capture(void) { - gboolean ret; + volatile gboolean ret = TRUE; guint i; GString *str; #ifdef USE_TSHARK_SELECT @@ -2532,13 +2532,15 @@ capture(void) if (ret == -1) { fprintf(stderr, "%s: %s\n", "select()", g_strerror(errno)); - return TRUE; + ret = TRUE; + loop_running = FALSE; } else if (ret == 1) { #endif /* Call the real handler */ if (!pipe_input.input_cb(pipe_input.source, pipe_input.user_data)) { g_log(NULL, G_LOG_LEVEL_DEBUG, "input pipe closed"); - return FALSE; + ret = FALSE; + loop_running = FALSE; } #ifdef USE_TSHARK_SELECT } @@ -2553,10 +2555,10 @@ capture(void) "\n" "More information and workarounds can be found at\n" "https://wiki.wireshark.org/KnownBugs/OutOfMemory\n"); - exit(1); + abort(); } ENDTRY; - return TRUE; + return ret; } /* capture child detected an error */ |