diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
commit | 794757ae8fbee85db2b24bc46b7e9cc492de01df (patch) | |
tree | a955184a13d8444bdec0de9200f261c46cfa2734 /epan/dissectors/packet-mms.c | |
parent | 449d732485da5a19b8a0d3ddef49ed30498712ff (diff) |
For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.
svn path=/trunk/; revision=39503
Diffstat (limited to 'epan/dissectors/packet-mms.c')
-rw-r--r-- | epan/dissectors/packet-mms.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c index 0366fbaf5b..c26b993cd4 100644 --- a/epan/dissectors/packet-mms.c +++ b/epan/dissectors/packet-mms.c @@ -7070,7 +7070,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if(parent_tree){ - item = proto_tree_add_item(parent_tree, proto_mms, tvb, 0, -1, FALSE); + item = proto_tree_add_item(parent_tree, proto_mms, tvb, 0, -1, ENC_NA); tree = proto_item_add_subtree(item, ett_mms); } col_set_str(pinfo->cinfo, COL_PROTOCOL, "MMS"); @@ -7090,7 +7090,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /*--- proto_register_mms -------------------------------------------*/ void proto_register_mms(void) { - + /* List of fields */ static hf_register_info hf[] = { @@ -9998,7 +9998,7 @@ void proto_register_mms(void) { static gboolean dissect_mms_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) -{ +{ /* must check that this really is an mms packet */ int offset = 0; guint32 length = 0 ; @@ -10008,40 +10008,40 @@ dissect_mms_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) gint8 tmp_class; gboolean tmp_pc; gint32 tmp_tag; - + /* first, check do we have at least 2 bytes (pdu) */ if (!tvb_bytes_exist(tvb, 0, 2)) return FALSE; /* no */ - + /* can we recognize MMS PDU ? Return FALSE if not */ /* get MMS PDU type */ offset = get_ber_identifier(tvb, offset, &tmp_class, &tmp_pc, &tmp_tag); - + /* check MMS type */ - - /* Class should be constructed */ + + /* Class should be constructed */ if (tmp_class!=BER_CLASS_CON) return FALSE; - + /* see if the tag is a valid MMS PDU */ match_strval_idx(tmp_tag, mms_MMSpdu_vals, &idx); - if (idx == -1) { + if (idx == -1) { return FALSE; /* no, it isn't an MMS PDU */ } - + /* check MMS length */ oct = tvb_get_guint8(tvb, offset)& 0x7F; if (oct==0) /* MMS requires length after tag so not MMS if indefinite length*/ return FALSE; - + offset = get_ber_length(tvb, offset, &length, NULL); /* do we have enough bytes? */ if (!tvb_bytes_exist(tvb, offset, length)) - return FALSE; - + return FALSE; + dissect_mms(tvb, pinfo, parent_tree); - return TRUE; + return TRUE; } /*--- proto_reg_handoff_mms --- */ |