tshark: Warn on overwriting protocol filter

Change-Id: I41a56cf384cda91fa6ed217f7c292f325ec8c07f
Reviewed-on: https://code.wireshark.org/review/34345
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Moshe Kaplan 2019-08-23 18:22:18 -04:00 committed by Anders Broman
parent 976da8e7fc
commit 5d12f7d597
1 changed files with 6 additions and 0 deletions

View File

@ -1162,9 +1162,15 @@ main(int argc, char *argv[])
}
break;
case 'j':
if (protocolfilter) {
cmdarg_err("-j or -J was already specified! Overwriting previous protocol filter");
}
protocolfilter = wmem_strsplit(wmem_epan_scope(), optarg, " ", -1);
break;
case 'J':
if (protocolfilter) {
cmdarg_err("-j or -J was already specified! Overwriting previous protocol filter");
}
protocolfilter_flags = PF_INCLUDE_CHILDREN;
protocolfilter = wmem_strsplit(wmem_epan_scope(), optarg, " ", -1);
break;