diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2007-03-03 23:33:56 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2007-03-03 23:33:56 +0000 |
commit | b874efb47da01a28ff2fac4854819e481915574c (patch) | |
tree | 763a411dc6e0129849ac0cd7708ed23cfc238a3c /asn1 | |
parent | 76518e6d1b34a2e52731b6f662fbde463541066a (diff) |
- have the signal name to be in the right subtree
svn path=/trunk/; revision=20966
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/h248/packet-h248-template.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 4adf7b48ed..053cad6985 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -595,31 +595,18 @@ static const h248_pkg_evt_t no_event = { 0, &hf_h248_no_evt, &ett_h248_no_evt, N static GPtrArray* packages = NULL; -extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u _U_, void* dissector_hdl) { +extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo , int hfid _U_, h248_curr_info_t* u1 _U_, void* u2 _U_) { tvbuff_t *new_tvb = NULL; proto_tree *package_tree=NULL; guint16 name_major, name_minor; int old_offset; const h248_package_t* pkg = NULL; guint i; - gint8 class; - gboolean pc, ind; - gint32 tag; - guint32 len; int offset = 0; old_offset=offset; - offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag); - offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind); - - if( (class!=BER_CLASS_UNI) - ||(tag!=BER_UNI_TAG_OCTETSTRING) ){ - proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", class, pc, tag); - return; - } - - new_tvb = tvb_new_subset(tvb,offset,len,len); - + offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hfid , &new_tvb); + if (new_tvb) { /* this field is always 4 bytes so just read it into two integers */ name_major=tvb_get_ntohs(new_tvb, 0); @@ -656,7 +643,7 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi strval = ep_strdup_printf("Unknown (%d)",name_minor); } - proto_item_set_text(pi,"Parameter: %s", strval); + proto_item_set_text(pi,"Signal ID: %s", strval); } } @@ -800,7 +787,7 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse { proto_item* pi = proto_tree_add_uint(package_tree, hf_248_pkg_param, tvb, offset-2, 2, name_minor); const gchar* strval; - + if (pkg->param_names && ( strval = match_strval(name_minor, pkg->param_names) )) { strval = ep_strdup_printf("%s (%d)",strval,name_minor); } else { @@ -876,7 +863,7 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs proto_item* pi = proto_tree_add_uint(package_tree, hf_h248_event_code, tvb, offset-2, 2, name_minor); const gchar* strval; - if (pkg->signal_names && ( strval = match_strval(name_minor, pkg->signal_names) )) { + if (pkg->event_names && ( strval = match_strval(name_minor, pkg->event_names) )) { strval = ep_strdup_printf("%s (%d)",strval,name_minor); } else { strval = ep_strdup_printf("Unknown (%d)",name_minor); |