aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sua.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-16 10:22:34 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-11-22 13:52:08 +0000
commit534b5967c0cbedf1cf3fb50278d43f981d8b64ab (patch)
treedd1ddefc8d92bdfa6def543bf3dd04e73fd1ec49 /epan/dissectors/packet-sua.c
parente2b597a898df890db995ba3f8120df99cb65a42f (diff)
Cleanup packet-sccp.c in preparation of trying to remove sccp_info member of packet_info.
Convert a handful of global variables into function parameters that get passed through the dissector, so we shouldn't be dependent on pinfo->sccp_info anymore. Removal of pinfo->sccp_info will be done in a separate patch (when the dissectors that use it can be updated). packet-sua.c may need similar treatment. Change-Id: If0001638d666afc07e04b02aa32ef31d6223a5de Reviewed-on: https://code.wireshark.org/review/5343 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sua.c')
-rw-r--r--epan/dissectors/packet-sua.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index 7e8fd50ed7..12ef1741bd 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -397,15 +397,15 @@ typedef struct _sua_assoc_info_t {
} sua_assoc_info_t;
static wmem_tree_t* assocs = NULL;
-sua_assoc_info_t* assoc;
-sua_assoc_info_t no_sua_assoc = {
+static sua_assoc_info_t* assoc;
+static sua_assoc_info_t no_sua_assoc = {
0, /* assoc_id */
0, /* calling_routing_ind */
0, /* called_routing_ind */
0, /* calling_dpc */
0, /* called_dpc */
- 0, /* calling_ssn */
- 0, /* called_ssn */
+ INVALID_SSN, /* calling_ssn */
+ INVALID_SSN, /* called_ssn */
FALSE, /* has_bw_key */
FALSE /* has_fw_key */
};
@@ -2177,7 +2177,7 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
* or with "load sharing"?
*/
sccp_assoc_info_t* sccp_assoc;
- reset_sccp_assoc();
+ sccp_decode_context_t sccp_info;
/* sua assoc */
switch (message_type) {
@@ -2227,7 +2227,13 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
#endif /* 0 */
}
- sccp_assoc = get_sccp_assoc(pinfo, tvb_offset_from_real_beginning(message_tvb), srn, drn, message_type);
+ sccp_info.message_type = message_type;
+ sccp_info.dlr = drn;
+ sccp_info.slr = srn;
+ sccp_info.assoc = NULL;
+ sccp_info.sccp_msg = NULL; /* Unused, but initialized */
+
+ sccp_assoc = get_sccp_assoc(pinfo, tvb_offset_from_real_beginning(message_tvb), &sccp_info);
if (sccp_assoc && sccp_assoc->curr_msg) {
pinfo->sccp_info = sccp_assoc->curr_msg;
tap_queue_packet(sua_tap,pinfo,sccp_assoc->curr_msg);