summaryrefslogtreecommitdiff
path: root/asn1
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-10-29 16:27:42 +0100
committerAnders Broman <a.broman58@gmail.com>2014-10-29 15:35:53 +0000
commit065d5c8417d3b21cbbf90f3f78917760079b006e (patch)
tree97c1858e81884d444c8e30e40466974b8710537f /asn1
parent79f878fc644b26480a29f241a031ca7067856365 (diff)
downloadwireshark-065d5c8417d3b21cbbf90f3f78917760079b006e.tar.gz
Don't include ctype.h and replace isascii() with _ascii_isprint().
Remove deprecated APIs while at it. Change-Id: I002ed4a696782caaeeb70a3e4ced4ae81f3d5372 Reviewed-on: https://code.wireshark.org/review/4983 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h248/h248.cnf6
-rw-r--r--asn1/h248/packet-h248-template.c1
2 files changed, 3 insertions, 4 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index 81b50c8971..018807d8ce 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -338,7 +338,7 @@ AuditReplyV1/auditResult audit_result
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
- curr_info.term->len = tvb_length(new_tvb);
+ curr_info.term->len = tvb_reported_length(new_tvb);
curr_info.term->type = 0; /* unknown */
if (h248_term_handle) {
@@ -396,13 +396,13 @@ AuditReplyV1/auditResult audit_result
#.FN_BODY ValueV1
/* check tvb to verify all values ascii or not. If so, output string, else hex */
- len=tvb_length_remaining(tvb, offset);
+ len=tvb_reported_length_remaining(tvb, offset);
if ( curr_info.par && curr_info.par->dissector) {
curr_info.par->dissector(tree, /*next_*/tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
} else {
/* if no registered dissector create output */
for( i=0;i<len;i++) {
- if(!isascii(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) {
+ if(!g_ascii_isprint(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) {
/* not ascii or NULL character so do string as hex string */
proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s",
(proto_registrar_get_nth(hf_index))->name,
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 2d8fb1a664..c2c18d516e 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -30,7 +30,6 @@
#include <epan/tap.h>
#include <epan/wmem/wmem.h>
#include "packet-tpkt.h"
-#include <ctype.h>
#include "packet-mtp3.h"
#define PNAME "H.248 MEGACO"