From bc1292ff1d12c78221d1400a32831623a12d659e Mon Sep 17 00:00:00 2001 From: Luis Ontanon Date: Fri, 20 May 2005 19:38:24 +0000 Subject: some cosmetic fixes svn path=/trunk/; revision=14401 --- asn1/h248/h248.cnf | 8 +++++--- asn1/h248/packet-h248-template.c | 17 ++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'asn1') diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index 3120c3b901..323d172e4d 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -80,15 +80,15 @@ ServiceChangeReply/terminationID terminationIDList #.END #.FN_FTR TransactionRequest - if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "}"); + if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "} }"); #.END #.FN_FTR TransactionPending - if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "}"); + if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "} }"); #.END #.FN_FTR TransactionAck - if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "}"); + if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "} }"); #.END #.FN_BODY ActionRequest/contextId @@ -186,3 +186,5 @@ ServiceChangeReply/terminationID terminationIDList #.TYPE_ATTR IP4Address/address TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL IP6Address/address TYPE = FT_IPv6 DISPLAY = BASE_NONE STRINGS = NULL +ActionRequest/contextId TYPE = FT_UINT32 DISPLAY = BASE_HEX STRINGS = NULL +ActionReply/contextId TYPE = FT_UINT32 DISPLAY = BASE_HEX STRINGS = NULL diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index feeeeb10c8..7c74d0fd86 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -329,7 +329,6 @@ static int dissect_h248_trx_id(gboolean implicit_tag, packet_info *pinfo, proto_ proto_tree_add_uint(tree, hf_h248_transactionId, tvb, offset-len, len, (guint32)trx_id); } } - if (check_col(pinfo->cinfo, COL_INFO)) { col_clear(pinfo->cinfo, COL_INFO); col_add_fstr(pinfo->cinfo, COL_INFO, "Trx %" PRIu64 " { ", trx_id); @@ -367,27 +366,29 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_ switch(context_id) { case 0x0000000: strncpy(context_string,"Ctx 0",sizeof(context_string)); - strncpy(context_string,"contextId: 0 (Null Context)",sizeof(context_string)); + strncpy(context_string,"0 (Null Context)",sizeof(context_string)); break; case 0xFFFFFFFF: strncpy(context_string,"Ctx *",sizeof(context_string)); - strncpy(context_string_long,"contextId: * (All Contexts)",sizeof(context_string)); + strncpy(context_string_long,"* (All Contexts)",sizeof(context_string)); break; case 0xFFFFFFFE: strncpy(context_string,"Ctx $",sizeof(context_string)); - strncpy(context_string_long,"contextId: $ (Choose One)",sizeof(context_string)); + strncpy(context_string_long,"$ (Choose One)",sizeof(context_string)); break; default: g_snprintf(context_string,sizeof(context_string),"Ctx 0x%" PRIx64, context_id); - g_snprintf(context_string_long,sizeof(context_string),"contextId: 0x%" PRIx64, context_id); + g_snprintf(context_string_long,sizeof(context_string),"0x%" PRIx64, context_id); break; } + if (context_id > 0xffffffff) { proto_tree_add_uint64_format(tree, hf_h248_contextId_64, tvb, offset-len, len, - context_id, "%s", context_string_long); + context_id, "contextId: %s", context_string_long); } else { - proto_tree_add_uint(tree, hf_h248_contextId, tvb, offset-len, len, (guint32)context_id); + proto_tree_add_uint_format(tree, hf_h248_contextId, tvb, offset-len, len, + (guint32)context_id, "contextId: %s", context_string_long); } } @@ -726,8 +727,6 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } dissect_h248_MegacoMessage(FALSE, tvb, 0, pinfo, h248_tree, -1); - - if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, " }"); } -- cgit v1.2.3