From 693291377eacb190b959e9905255005390104f56 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Thu, 8 May 2008 14:01:31 +0000 Subject: Stop using deprecated functions identified by checkAPIs script. svn path=/trunk/; revision=25258 --- epan/dissectors/packet-mgcp.c | 15 ++++--- epan/dissectors/packet-nntp.c | 5 ++- epan/dissectors/packet-rfc2190.c | 2 +- epan/dissectors/packet-rtcp.c | 88 ++++++++++++++++++++-------------------- epan/dissectors/packet-sdp.c | 15 ++++--- epan/dissectors/packet-zebra.c | 3 +- 6 files changed, 69 insertions(+), 59 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index a45759056c..24f4dc19f0 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -402,8 +402,9 @@ static void dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (mgcp_tree) { - proto_tree_add_uint_hidden(mgcp_tree, hf_mgcp_messagecount, tvb, - 0 ,0 , num_messages); + proto_item *ti = proto_tree_add_uint(mgcp_tree, hf_mgcp_messagecount, tvb, + 0 ,0 , num_messages); + PROTO_ITEM_SET_HIDDEN(ti); } /* @@ -1543,7 +1544,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree switch (mgcp_type) { case MGCP_RESPONSE: - proto_tree_add_boolean_hidden(tree, hf_mgcp_rsp, tvb, 0, 0, TRUE); + PROTO_ITEM_SET_HIDDEN(proto_tree_add_boolean(tree, hf_mgcp_rsp, tvb, 0, 0, TRUE)); /* Check for MGCP response. A response must match a call that we've seen, and the response must be sent to the same port and address that the call came from, and must @@ -1631,7 +1632,8 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (tree) { proto_item* item; - proto_tree_add_uint_hidden(tree, hf_mgcp_dup, tvb, 0,0, mi->transid); + item = proto_tree_add_uint(tree, hf_mgcp_dup, tvb, 0,0, mi->transid); + PROTO_ITEM_SET_HIDDEN(item); item = proto_tree_add_uint(tree, hf_mgcp_rsp_dup, tvb, 0, 0, mi->transid); PROTO_ITEM_SET_GENERATED(item); @@ -1647,7 +1649,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree } break; case MGCP_REQUEST: - proto_tree_add_boolean_hidden(tree, hf_mgcp_req, tvb, 0, 0, TRUE); + PROTO_ITEM_SET_HIDDEN(proto_tree_add_boolean(tree, hf_mgcp_req, tvb, 0, 0, TRUE)); /* Keep track of the address and port whence the call came, * and the port to which the call is being sent, so that * we can match up calls with replies. @@ -1725,7 +1727,8 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (tree) { proto_item* item; - proto_tree_add_uint_hidden(tree, hf_mgcp_dup, tvb, 0,0, mi->transid); + item = proto_tree_add_uint(tree, hf_mgcp_dup, tvb, 0,0, mi->transid); + PROTO_ITEM_SET_HIDDEN(item); item = proto_tree_add_uint(tree, hf_mgcp_req_dup, tvb, 0,0, mi->transid); PROTO_ITEM_SET_GENERATED(item); item = proto_tree_add_uint(tree, hf_mgcp_req_dup_frame, tvb, 0,0, mi->req_num); diff --git a/epan/dissectors/packet-nntp.c b/epan/dissectors/packet-nntp.c index 9c3cd64861..64f3347d14 100644 --- a/epan/dissectors/packet-nntp.c +++ b/epan/dissectors/packet-nntp.c @@ -81,12 +81,13 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) nntp_tree = proto_item_add_subtree(ti, ett_nntp); if (pinfo->match_port == pinfo->destport) { - proto_tree_add_boolean_hidden(nntp_tree, + ti = proto_tree_add_boolean(nntp_tree, hf_nntp_request, tvb, 0, 0, TRUE); } else { - proto_tree_add_boolean_hidden(nntp_tree, + ti = proto_tree_add_boolean(nntp_tree, hf_nntp_response, tvb, 0, 0, TRUE); } + PROTO_ITEM_SET_HIDDEN(ti); /* * Show the request or response as text, a line at a time. diff --git a/epan/dissectors/packet-rfc2190.c b/epan/dissectors/packet-rfc2190.c index 7b1a6ecbfc..de270bf64e 100644 --- a/epan/dissectors/packet-rfc2190.c +++ b/epan/dissectors/packet-rfc2190.c @@ -2,7 +2,7 @@ * * Routines for RFC2190-encapsulated H.263 dissection * - * Copyright 2003 Niklas ™gren + * Copyright 2003 Niklas Ogren * Seven Levels Consultants AB * * Copyright 2008 Richard van der Hoff, MX Telecom diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 9af8a52af1..197de48678 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -715,51 +715,53 @@ dissect_rtcp_rtpfb( tvbuff_t *tvb, int offset, proto_tree *rtcp_tree, proto_item offset += 4; /* Transport-Layer Feedback Message Elements */ - switch(rtcp_rtpfb_fmt) { - case 1: - /* NACK */ - while ((offset - start_offset) < packet_length) { - proto_tree_add_item( rtcp_tree, hf_rtcp_rtpfb_nack_pid, - tvb, offset, 2, FALSE); - rtcp_rtpfb_nack_pid = tvb_get_ntohs(tvb, offset); - offset += 2; - ti = proto_tree_add_item( rtcp_tree, hf_rtcp_rtpfb_nack_blp, - tvb, offset, 2, FALSE); - proto_item_set_text(ti, "RTCP Transport Feedback NACK BLP: "); - rtcp_rtpfb_nack_blp = tvb_get_ntohs(tvb, offset); - bitfield_tree = proto_item_add_subtree( ti, ett_rtcp_nack_blp); - nack_num_frames_lost ++; - if (rtcp_rtpfb_nack_blp) { - for (i = 0; i < 16; i ++) { - g_snprintf(strbuf, 64, "Frame %d also lost", rtcp_rtpfb_nack_pid + i + 1); - proto_tree_add_text( - bitfield_tree, tvb, offset, 2, - decode_boolean_bitfield(rtcp_rtpfb_nack_blp, (1<