diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-07-07 19:28:20 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-07-08 03:45:31 +0000 |
commit | 9b4f16a2041fec02e44cc14def5f3f7e2fde712b (patch) | |
tree | 24755ae4df9602e8b48c76db03d8d68992d7f0c8 | |
parent | e82e137bf1239ec521f26daaae02efe7d2f02c33 (diff) | |
download | wireshark-9b4f16a2041fec02e44cc14def5f3f7e2fde712b.tar.gz |
gsmtap: do not abort if dissector is unavailable
Encountered with the following attachments from bugs:
6575-test-dlmapc-wmx
6577-test-dlmapc-wmx
6579-test-dlmapc-wmx
Also added modelines.
Change-Id: I3859bed618830ad359bd0b2b1fdfc3c5fc13269e
Reviewed-on: https://code.wireshark.org/review/2920
Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r-- | epan/dissectors/packet-gsmtap.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c index da057d7551..33deab366f 100644 --- a/epan/dissectors/packet-gsmtap.c +++ b/epan/dissectors/packet-gsmtap.c @@ -715,8 +715,9 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (sub_handle == GSMTAP_SUB_UMTS_RRC) call_dissector(rrc_sub_handles[rrc_sub_handle], payload_tvb, pinfo, tree); - else + else if (sub_handles[sub_handle] != NULL) call_dissector(sub_handles[sub_handle], payload_tvb, pinfo, tree); + /* TODO: warn user that the WiMAX plugin must be enabled for some types */ } static const true_false_string sacch_l1h_fpc_mode_vals = { @@ -784,6 +785,7 @@ proto_reg_handoff_gsmtap(void) { dissector_handle_t gsmtap_handle; + /* TODO: some dissectors may be NULL if not loaded */ sub_handles[GSMTAP_SUB_DATA] = find_dissector("data"); sub_handles[GSMTAP_SUB_UM] = find_dissector("gsm_a_ccch"); sub_handles[GSMTAP_SUB_UM_LAPDM] = find_dissector("lapdm"); @@ -871,3 +873,16 @@ proto_reg_handoff_gsmtap(void) gsmtap_handle = create_dissector_handle(dissect_gsmtap, proto_gsmtap); dissector_add_uint("udp.port", GSMTAP_UDP_PORT, gsmtap_handle); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ |