wireshark-dev March 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: [Wireshark-dev] proto_tree_get_parent()

[Wireshark-dev] proto_tree_get_parent()

From: Eloy Paris <peloy_at_nospam>
Date: Fri Mar 26 2010 - 00:48:47 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

Is this right (from epan/proto.c):

proto_item*
proto_tree_get_parent(proto_tree *tree) {
        if (!tree)
                return (NULL);
        return (proto_item*) tree;
}

This basically returns the same thing that is received as a parameter.
Shouldn't tree->parent be returned instead, just as
proto_item_get_parent() (a few lines above in the same file) does?

The weird thing is that there is code using this seemingly broken
proto_tree_get_parent(). I don't know how things are working given that
proto_tree_get_parent() is not really providing the parent node.

Confused,

Eloy Paris.-
netexpect.org
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe