diff --git a/asn1/s1ap/packet-s1ap-template.c b/asn1/s1ap/packet-s1ap-template.c index 61125e8812..423b8215ec 100644 --- a/asn1/s1ap/packet-s1ap-template.c +++ b/asn1/s1ap/packet-s1ap-template.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/asn1/s1ap/s1ap.cnf b/asn1/s1ap/s1ap.cnf index 0815dcd167..085647e81e 100644 --- a/asn1/s1ap/s1ap.cnf +++ b/asn1/s1ap/s1ap.cnf @@ -206,7 +206,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") tvbuff_t *parameter_tvb=NULL; int length; int p_offset; - gboolean is_ascii; + gboolean is_printable_ascii; %(DEFAULT_BODY)s @@ -215,14 +215,14 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") length = tvb_reported_length(parameter_tvb); - is_ascii = TRUE; + is_printable_ascii = TRUE; for (p_offset=0; p_offset < length; p_offset++){ - if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){ - is_ascii = FALSE; + if(!g_ascii_isprint(tvb_get_guint8(parameter_tvb, p_offset ))){ + is_printable_ascii = FALSE; break; } } - if (is_ascii) + if (is_printable_ascii) proto_item_append_text(actx->created_item,"(%%s)",tvb_format_text(parameter_tvb, 0, length)); #.END diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index dee443d7c6..371d0a0376 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -38,7 +38,6 @@ #include #include -#include #include #include #include @@ -362,7 +361,7 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-s1ap-val.h ---*/ -#line 68 "../../asn1/s1ap/packet-s1ap-template.c" +#line 67 "../../asn1/s1ap/packet-s1ap-template.c" /* Initialize the protocol and registered fields */ static int proto_s1ap = -1; @@ -920,7 +919,7 @@ static int hf_s1ap_eHRPD_Sector_ID_01 = -1; /* EHRPD_Sector_ID */ static int hf_s1ap_eHRPDSectorLoadReportingResponse = -1; /* EHRPDSectorLoadReportingResponse */ /*--- End of included file: packet-s1ap-hf.c ---*/ -#line 75 "../../asn1/s1ap/packet-s1ap-template.c" +#line 74 "../../asn1/s1ap/packet-s1ap-template.c" /* Initialize the subtree pointers */ static int ett_s1ap = -1; @@ -1209,7 +1208,7 @@ static gint ett_s1ap_EHRPDCompositeAvailableCapacity = -1; static gint ett_s1ap_EHRPDMultiSectorLoadReportingResponseItem = -1; /*--- End of included file: packet-s1ap-ett.c ---*/ -#line 87 "../../asn1/s1ap/packet-s1ap-template.c" +#line 86 "../../asn1/s1ap/packet-s1ap-template.c" enum{ INITIATING_MESSAGE, @@ -3442,7 +3441,7 @@ dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr tvbuff_t *parameter_tvb=NULL; int length; int p_offset; - gboolean is_ascii; + gboolean is_printable_ascii; offset = dissect_per_PrintableString(tvb, offset, actx, tree, hf_index, 1, 150, TRUE); @@ -3453,14 +3452,14 @@ dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr length = tvb_reported_length(parameter_tvb); - is_ascii = TRUE; + is_printable_ascii = TRUE; for (p_offset=0; p_offset < length; p_offset++){ - if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){ - is_ascii = FALSE; + if(!g_ascii_isprint(tvb_get_guint8(parameter_tvb, p_offset ))){ + is_printable_ascii = FALSE; break; } } - if (is_ascii) + if (is_printable_ascii) proto_item_append_text(actx->created_item,"(%s)",tvb_format_text(parameter_tvb, 0, length)); @@ -10456,7 +10455,7 @@ int dissect_s1ap_SONtransferCause_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-s1ap-fn.c ---*/ -#line 134 "../../asn1/s1ap/packet-s1ap-template.c" +#line 133 "../../asn1/s1ap/packet-s1ap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -10779,7 +10778,7 @@ proto_reg_handoff_s1ap(void) /*--- End of included file: packet-s1ap-dis-tab.c ---*/ -#line 207 "../../asn1/s1ap/packet-s1ap-template.c" +#line 206 "../../asn1/s1ap/packet-s1ap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, s1ap_handle); @@ -12996,7 +12995,7 @@ void proto_register_s1ap(void) { NULL, HFILL }}, /*--- End of included file: packet-s1ap-hfarr.c ---*/ -#line 235 "../../asn1/s1ap/packet-s1ap-template.c" +#line 234 "../../asn1/s1ap/packet-s1ap-template.c" }; /* List of subtrees */ @@ -13286,7 +13285,7 @@ void proto_register_s1ap(void) { &ett_s1ap_EHRPDMultiSectorLoadReportingResponseItem, /*--- End of included file: packet-s1ap-ettarr.c ---*/ -#line 248 "../../asn1/s1ap/packet-s1ap-template.c" +#line 247 "../../asn1/s1ap/packet-s1ap-template.c" }; module_t *s1ap_module;