提交 d3ede96d 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 0a84286d
...@@ -56,7 +56,7 @@ static int hf_libvirt_serial = -1; ...@@ -56,7 +56,7 @@ static int hf_libvirt_serial = -1;
static int hf_libvirt_status = -1; static int hf_libvirt_status = -1;
static int hf_libvirt_stream = -1; static int hf_libvirt_stream = -1;
static int hf_libvirt_num_of_fds = -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; static gint ett_libvirt = -1;
#define XDR_PRIMITIVE_DISSECTOR(xtype, ctype, ftype) \ #define XDR_PRIMITIVE_DISSECTOR(xtype, ctype, ftype) \
......
...@@ -57,6 +57,9 @@ for my $proto (@ARGV) { ...@@ -57,6 +57,9 @@ for my $proto (@ARGV) {
$c->add_header_file($name, sub { $c->add_header_file($name, sub {
dbg "*** Start parsing $proto\n"; dbg "*** Start parsing $proto\n";
$c->print("extern int hf_libvirt_unknown;\n");
my @lexs = Lexicalizer->parse($source); my @lexs = Lexicalizer->parse($source);
for my $lex (@lexs) { for my $lex (@lexs) {
next if $lex->ident eq "enum $name\_procedure"; next if $lex->ident eq "enum $name\_procedure";
...@@ -903,7 +906,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR * ...@@ -903,7 +906,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR *
<% } %> <% } %>
} }
} else { } 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; return FALSE;
} }
...@@ -933,7 +936,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR * ...@@ -933,7 +936,7 @@ static gboolean dissect_xdr_<%= $ident %>(tvbuff_t *tvb, proto_tree *tree, XDR *
<% } %> <% } %>
} }
if (!rc) { 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; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册