summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-10-30 17:37:10 -0700
committerGuy Harris <guy@alum.mit.edu>2016-10-31 00:37:42 +0000
commit706c10663499b90639ab8e46e171c4d4952778bf (patch)
tree5835d1fb6dd242d25c4b35eedf20152d90d8384e /tshark.c
parent45a023f3d0f616d518a1eb0b08b68c109def3616 (diff)
downloadwireshark-706c10663499b90639ab8e46e171c4d4952778bf.tar.gz
Have the routine that handles dissection options not exit.
Have it return TRUE if the option is OK and FALSE if it isn't, and let its caller exit as appropriate. Also, rename it - it's not adding something to a collection, it's just handling the option. Change-Id: I41863cbb67b7c257d900d3011609891b9b4a7467 Reviewed-on: https://code.wireshark.org/review/18587 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 12452ecb3b..8f838726a6 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1315,7 +1315,8 @@ main(int argc, char *argv[])
case LONGOPT_DISABLE_PROTOCOL: /* disable dissection of protocol */
case LONGOPT_ENABLE_HEURISTIC: /* enable heuristic dissection of protocol */
case LONGOPT_DISABLE_HEURISTIC: /* disable heuristic dissection of protocol */
- dissect_opts_add_opt(opt, optarg);
+ if (!dissect_opts_handle_opt(opt, optarg))
+ return 1;
break;
default: