extcap-base: remove print of version if no interfaces present.

When no interfaces are available (as with androiddump when adb
is not running) version is not printed anymore, for a cleaner
output.

Change-Id: Ia150a58ff1c04e412ff29a540f18e1fe9612f633
Reviewed-on: https://code.wireshark.org/review/14289
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Dario Lombardo 2016-03-02 14:58:52 +01:00 committed by Roland Knall
parent e37275bfde
commit 8def5c40de
1 changed files with 6 additions and 4 deletions

View File

@ -195,11 +195,13 @@ static void extcap_print_version(extcap_parameters * extcap)
static gint extcap_iface_listall(extcap_parameters * extcap, uint8_t list_ifs)
{
if (list_ifs) {
extcap_print_version(extcap);
g_list_foreach(extcap->interfaces, extcap_iface_print, extcap);
if (g_list_length(extcap->interfaces) > 0) {
extcap_print_version(extcap);
g_list_foreach(extcap->interfaces, extcap_iface_print, extcap);
}
} else {
if (extcap->do_version) {
extcap_print_version(extcap);
if (extcap->do_version) {
extcap_print_version(extcap);
} else {
GList * element = NULL;
extcap_interface * iface = NULL;