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>
This commit is contained in:
Dario Lombardo 2018-10-19 17:07:14 +02:00 committed by Peter Wu
parent 7994111882
commit 1fdc0f4a6f
1 changed files with 7 additions and 5 deletions

View File

@ -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 */