aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-26 15:10:06 -0500
committerAnders Broman <a.broman58@gmail.com>2015-11-27 05:11:25 +0000
commit3606f80d9e297c2c1fd8e69b2d2a9e13a99d4344 (patch)
tree3aa83dd74b85ea84f6aea028a20e494dc674896f /plugins
parent10261d120283cb739118fa7178b4e911ed72de14 (diff)
Officially remove tvb_get_string and tvb_get_stringz.
Almost all replacements were done awhile ago, just put the final nail in the coffin. Change-Id: I0a708d886da5a500c2a1e2c9ee2736794bdb9411 Reviewed-on: https://code.wireshark.org/review/12206 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/irda/packet-irda.c10
-rw-r--r--plugins/unistim/packet-unistim.c4
-rw-r--r--plugins/wimaxasncp/packet-wimaxasncp.c2
3 files changed, 6 insertions, 10 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index e1e1d9dae9..6430393b15 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -724,15 +724,14 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case GET_VALUE_BY_CLASS:
if (retcode == 0)
{
- guint8 *string;
switch (tvb_get_guint8(tvb, offset + 6))
{
case IAS_MISSING:
- g_snprintf(buf, 300, ", Missing");
+ col_append_str(pinfo->cinfo, COL_INFO, ", Missing");
break;
case IAS_INTEGER:
- g_snprintf(buf, 300, ", Integer: %d", tvb_get_ntohl(tvb, offset + 7));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Integer: %d", tvb_get_ntohl(tvb, offset + 7));
break;
case IAS_OCT_SEQ:
@@ -741,14 +740,11 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case IAS_STRING:
n = tvb_get_guint8(tvb, offset + 8);
- string = tvb_get_string(wmem_packet_scope(), tvb, offset + 9, n);
- g_snprintf(buf, 300, ", \"%s\"", string);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 9, n, ENC_ASCII));
break;
default:
- buf[0] = '\0';
break;
}
- col_append_str(pinfo->cinfo, COL_INFO, buf);
if (tvb_get_ntohs(tvb, offset + 2) > 1)
col_append_str(pinfo->cinfo, COL_INFO, ", ...");
}
diff --git a/plugins/unistim/packet-unistim.c b/plugins/unistim/packet-unistim.c
index 7858f78ee4..a93fff9657 100644
--- a/plugins/unistim/packet-unistim.c
+++ b/plugins/unistim/packet-unistim.c
@@ -1048,8 +1048,8 @@ dissect_display_switch(proto_tree *msg_tree,
}
if(msg_len>0){
/* I'm guessing this will work flakily at best */
- uinfo->string_data = tvb_get_string(wmem_packet_scope(), tvb,offset,msg_len);
- proto_tree_add_item(msg_tree,hf_generic_string,tvb,offset,msg_len,ENC_ASCII|ENC_NA);
+ uinfo->string_data = tvb_get_string_enc(wmem_packet_scope(), tvb,offset,msg_len,ENC_ASCII);
+ proto_tree_add_string(msg_tree,hf_generic_string,tvb,offset,msg_len,uinfo->string_data);
}
offset+=msg_len;
diff --git a/plugins/wimaxasncp/packet-wimaxasncp.c b/plugins/wimaxasncp/packet-wimaxasncp.c
index 64c5cb36ee..d769d4643d 100644
--- a/plugins/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/wimaxasncp/packet-wimaxasncp.c
@@ -822,7 +822,7 @@ static void wimaxasncp_dissect_tlv_value(
{
if (tree)
{
- const gchar *s = tvb_get_string(wmem_packet_scope(), tvb, offset, length);
+ const gchar *s = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
proto_tree_add_string_format(
tree, tlv_info->hf_value,