1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-09 01:18:00 +03:00

wireshark: s/proto_tree_add_text/proto_tree_add_item/

In the wireshark commit e2735ecfdd7a96c they dropped
proto_tree_add_text in favor of proto_tree_add_item. Adapt to
this change.

Moreover, the proto_tree_add_item API is around for ages and we
are already using it anyway. Therefore we don't need to change
required version of wireshark.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2015-12-27 10:43:37 +01:00
parent 0a84286d8f
commit d3ede96d6f
2 changed files with 6 additions and 3 deletions

View File

@ -56,7 +56,7 @@ static int hf_libvirt_serial = -1;
static int hf_libvirt_status = -1;
static int hf_libvirt_stream = -1;
static int hf_libvirt_num_of_fds = -1;
static int hf_libvirt_unknown = -1;
int hf_libvirt_unknown = -1;
static gint ett_libvirt = -1;
#define XDR_PRIMITIVE_DISSECTOR(xtype, ctype, ftype) \

View File

@ -57,6 +57,9 @@ for my $proto (@ARGV) {
$c->add_header_file($name, sub {
dbg "*** Start parsing $proto\n";
$c->print("extern int hf_libvirt_unknown;\n");
my @lexs = Lexicalizer->parse($source);
for my $lex (@lexs) {
next if $lex->ident eq "enum $name\_procedure";
@ -903,7 +906,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR *
<% } %>
}
} else {
proto_tree_add_text(tree, tvb, start, -1, "(unknown)");
proto_tree_add_item(tree, hf_libvirt_unknown, tvb, start, -1, ENC_NA);
}
return FALSE;
}
@ -933,7 +936,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR *
<% } %>
}
if (!rc) {
proto_tree_add_text(tree, tvb, start, -1, "(unknown)");
proto_tree_add_item(tree, hf_libvirt_unknown, tvb, start, -1, ENC_NA);
}
return rc;
}