extcap: make extcaps use the version registered in config.

Change-Id: I12d0d0bec06e02af0a9d0877c0f0f1d86261d752
Reviewed-on: https://code.wireshark.org/review/17296
Petri-Dish: 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:
Dario Lombardo 2016-08-24 10:43:11 +02:00 committed by Roland Knall
parent 2095b32599
commit f269f56c1a
5 changed files with 4 additions and 5 deletions

View File

@ -2554,7 +2554,7 @@ int main(int argc, char **argv) {
switch (result) {
case OPT_VERSION:
printf("%s.%s.%s\n", ANDROIDDUMP_VERSION_MAJOR, ANDROIDDUMP_VERSION_MINOR, ANDROIDDUMP_VERSION_RELEASE);
printf("%s\n", extcap_conf->version);
return EXIT_CODE_SUCCESS;
case OPT_HELP:
extcap_help_print(extcap_conf);

View File

@ -585,7 +585,7 @@ int main(int argc, char **argv)
goto end;
case OPT_VERSION:
printf("%s.%s.%s\n", CISCODUMP_VERSION_MAJOR, CISCODUMP_VERSION_MINOR, CISCODUMP_VERSION_RELEASE);
printf("%s\n", extcap_conf->version);
goto end;
case OPT_REMOTE_HOST:

View File

@ -313,7 +313,6 @@ void extcap_help_add_option(extcap_parameters * extcap, const char * help_option
extcap->help_options = g_list_append(extcap->help_options, o);
}
void extcap_help_add_header(extcap_parameters * extcap, char * help_header)
{
extcap->help_header = g_strdup(help_header);

View File

@ -180,7 +180,7 @@ int main(int argc, char *argv[])
while ((result = getopt_long(argc, argv, ":", longopts, &option_idx)) != -1) {
switch (result) {
case OPT_VERSION:
printf("%s.%s.%s\n", RANDPKTDUMP_VERSION_MAJOR, RANDPKTDUMP_VERSION_MINOR, RANDPKTDUMP_VERSION_RELEASE);
printf("%s\n", extcap_conf->version);
ret = EXIT_SUCCESS;
goto end;

View File

@ -369,7 +369,7 @@ int main(int argc, char **argv)
goto end;
case OPT_VERSION:
printf("%s.%s.%s\n", SSHDUMP_VERSION_MAJOR, SSHDUMP_VERSION_MINOR, SSHDUMP_VERSION_RELEASE);
printf("%s\n", extcap_conf->version);
ret = EXIT_SUCCESS;
goto end;