aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-stun.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2013-01-20 18:32:56 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2013-01-20 18:32:56 +0000
commit31b969a4b5e5a0bce6bc368d5395b008f98dfe3d (patch)
treea7d889fe3cffeb398eef347dc96b33d22e9f54ca /epan/dissectors/packet-stun.c
parent26df7b88e535d70ca86637b87e6df5706238f475 (diff)
Replace tvb_get_ipv4 / ip_to_str ... by tvb_ip_to_str
svn path=/trunk/; revision=47181
Diffstat (limited to 'epan/dissectors/packet-stun.c')
-rw-r--r--epan/dissectors/packet-stun.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c
index 4031ff6c51..1a65857809 100644
--- a/epan/dissectors/packet-stun.c
+++ b/epan/dissectors/packet-stun.c
@@ -670,18 +670,13 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
break;
proto_tree_add_item(att_tree, stun_att_port, tvb, offset+2, 2, ENC_BIG_ENDIAN);
switch (tvb_get_guint8(tvb, offset+1))
- {
+ {
case 1:
if (att_length < 8)
break;
proto_tree_add_item(att_tree, stun_att_ipv4, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- {
- const gchar *ipstr;
- guint32 ip;
- ip = tvb_get_ipv4(tvb,offset+4);
- ipstr = ip_to_str((guint8*)&ip);
- proto_item_append_text(att_tree, " (Deprecated): %s:%d", ipstr,tvb_get_ntohs(tvb,offset+2));
- }
+ proto_item_append_text(att_tree, " (Deprecated): %s:%d", tvb_ip_to_str(tvb, offset+4),tvb_get_ntohs(tvb,offset+2));
+
break;
case 2:
@@ -689,7 +684,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
break;
proto_tree_add_item(att_tree, stun_att_ipv6, tvb, offset+4, 16, ENC_NA);
break;
- }
+ }
break;
/* Deprecated STUN RFC3489 attributes */