diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
commit | 0f157e7d6c4be48f213ea022cb2d6d1316c423c8 (patch) | |
tree | ff4ad271b50a39e23d5a50a54f4bff37342cdc1c /epan/dissectors/packet-gsm_a_rp.c | |
parent | Adding debian version 4.2.4-1. (diff) | |
download | wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.tar.xz wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.zip |
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_rp.c')
-rw-r--r-- | epan/dissectors/packet-gsm_a_rp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c index 66c02b2..f20e8a7 100644 --- a/epan/dissectors/packet-gsm_a_rp.c +++ b/epan/dissectors/packet-gsm_a_rp.c @@ -26,6 +26,7 @@ #include <wsutil/wsjson.h> #include "packet-gsm_a_common.h" +#include "packet-media-type.h" void proto_register_gsm_a_rp(void); void proto_reg_handoff_gsm_a_rp(void); @@ -488,7 +489,7 @@ dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } static int -dissect_nf_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +dissect_nf_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, media_content_info_t *content_info) { tvbuff_t* json_tvb; int ret; @@ -496,6 +497,8 @@ dissect_nf_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) char *json_data; const char *content_id; + if (!gsm_a_dtap_handle || !content_info || content_info->type > MEDIA_CONTAINER_HTTP_OTHERS || !content_info->content_id) + return 0; json_tvb = (tvbuff_t*)p_get_proto_data(pinfo->pool, pinfo, proto_json, 0); if (!json_tvb) return 0; @@ -510,18 +513,19 @@ dissect_nf_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!cur_tok) return 0; content_id = json_get_string(json_data, cur_tok, "contentId"); - if (content_id && !strcmp(content_id, "sms") && gsm_a_dtap_handle) + if (content_id && !strcmp(content_id, content_info->content_id)) return call_dissector_only(gsm_a_dtap_handle, tvb, pinfo, tree, NULL); return 0; } static int -dissect_rp_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_rp_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { int ret; + media_content_info_t *content_info = (media_content_info_t *)data; - ret = dissect_nf_media_type(tvb, pinfo, tree); + ret = dissect_nf_media_type(tvb, pinfo, tree, content_info); if (!ret) ret = dissect_rp(tvb, pinfo, tree, NULL); return ret; |