summaryrefslogtreecommitdiffstats
path: root/src/isi-gps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/isi-gps.c')
-rw-r--r--src/isi-gps.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/isi-gps.c b/src/isi-gps.c
index c262cf6..1e4acfd 100644
--- a/src/isi-gps.c
+++ b/src/isi-gps.c
@@ -543,8 +543,8 @@ static size_t dissect_isi_location_subpkg(tvbuff_t *tvb, packet_info *pinfo, pro
guint16 sptype = tvb_get_ntohs(tvb, offset+0);
guint16 splen = tvb_get_ntohs(tvb, offset+2);
- proto_item *subitem = proto_tree_add_text(tree, tvb, offset, splen, "Subpacket (%s)", val_to_str(sptype, isi_location_sub_id, "unknown: 0x%x"));
- proto_tree *subtree = proto_item_add_subtree(subitem, ett_isi_msg);
+ proto_item *subitem;
+ proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, offset, splen, ett_isi_msg, &subitem, "Subpacket (%s)", val_to_str(sptype, isi_location_sub_id, "unknown: 0x%x"));
proto_tree_add_item(subtree, hf_isi_location_sub_type, tvb, offset+0, 2, FALSE);
proto_tree_add_item(subtree, hf_isi_location_sub_len, tvb, offset+2, 2, FALSE);
@@ -646,8 +646,7 @@ static size_t dissect_isi_location_subpkg(tvbuff_t *tvb, packet_info *pinfo, pro
int sat;
for(sat = 0; sat < satellites ; sat++) {
int pos = offset+4+(sat*SAT_PKG_LEN);
- proto_item *satitem = proto_tree_add_text(subtree, tvb, pos, SAT_PKG_LEN, "Satellite %d", sat);
- proto_tree *sattree = proto_item_add_subtree(satitem, ett_isi_msg);
+ proto_tree *sattree = proto_tree_add_subtree_format(subtree, tvb, offset, splen, ett_isi_msg, NULL, "Satellite %d", sat);
float signal_strength = tvb_get_ntohs(tvb, pos+3) / 100.0;
float elevation = tvb_get_ntohs(tvb, pos+6) / 100.0;
@@ -692,8 +691,7 @@ static void dissect_isi_location(tvbuff_t *tvb, packet_info *pinfo, proto_item *
int i;
if(isitree) {
- item = proto_tree_add_text(isitree, tvb, 0, -1, "Payload");
- tree = proto_item_add_subtree(item, ett_isi_msg);
+ tree = proto_tree_add_subtree_format(isitree, tvb, 0, -1, ett_isi_msg, &item, "Payload");
proto_tree_add_item(tree, hf_isi_location_cmd, tvb, 0, 1, FALSE);
cmd = tvb_get_guint8(tvb, 0);