extcap: Remove g_spawn_check_exit_status

This function is not supported in the min GLIB version, therefore
the code is to be removed

Change-Id: Ie39170bfc0662e5a477cbc45d7eadebcf2c70d4e
Reviewed-on: https://code.wireshark.org/review/16827
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Roland Knall 2016-08-01 16:57:51 +02:00 committed by Roland Knall
parent c84af8d8c6
commit d62ad9dd47
1 changed files with 12 additions and 3 deletions

View File

@ -821,7 +821,6 @@ void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data)
{
guint i;
interface_options interface_opts;
GError * error = 0;
extcap_userdata * userdata = NULL;
capture_options * capture_opts = (capture_options *)(user_data);
@ -842,8 +841,18 @@ void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data)
{
interface_opts.extcap_pid = INVALID_EXTCAP_PID;
userdata->exitcode = 0;
if ( ! g_spawn_check_exit_status(status, &error) )
userdata->exitcode = error->code;
#ifndef _WIN32
if ( WIFEXITED(status) )
{
if ( WEXITSTATUS(status) != 0 )
userdata->exitcode = WEXITSTATUS(status);
}
else
userdata->exitcode = G_SPAWN_ERROR_FAILED;
#else
if (status != 0)
userdata->exitcode = status;
#endif
if ( status == 0 && userdata->extcap_stderr != NULL )
userdata->exitcode = 1;
}