aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/p1/packet-p1-template.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2021-02-10 09:01:02 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-02-10 12:29:42 +0000
commit9dd74b2788272a9b650c733cedbb61f7e7ef9f27 (patch)
tree6bda4f695f3f3af0dd2d7924a92d2e97ec19514f /epan/dissectors/asn1/p1/packet-p1-template.c
parent52163d05ba9d5f1d1bbbbaf0cc3be232b4c91092 (diff)
p1: Rewrite do_address for extension attributes
Rewrite do_address handling to use proto_data instead of pinfo->private_table. Related to #17156
Diffstat (limited to 'epan/dissectors/asn1/p1/packet-p1-template.c')
-rw-r--r--epan/dissectors/asn1/p1/packet-p1-template.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/asn1/p1/packet-p1-template.c b/epan/dissectors/asn1/p1/packet-p1-template.c
index 1183ad5485..7a736838c4 100644
--- a/epan/dissectors/asn1/p1/packet-p1-template.c
+++ b/epan/dissectors/asn1/p1/packet-p1-template.c
@@ -17,6 +17,7 @@
#include <epan/asn1.h>
#include <epan/expert.h>
#include <epan/strutil.h>
+#include <epan/proto_data.h>
#include "packet-ber.h"
#include "packet-acse.h"
@@ -72,7 +73,6 @@ static dissector_handle_t p1_handle;
#include "packet-p1-table.c" /* operation and error codes */
-#define P1_ADDRESS_CTX "p1-address-ctx"
typedef struct p1_address_ctx {
gboolean do_address;
const char *content_type_id;
@@ -96,10 +96,8 @@ static p1_address_ctx_t *get_do_address_ctx(asn1_ctx_t* actx)
{
p1_address_ctx_t* ctx = NULL;
- if (actx->pinfo->private_table) {
- /* First check if called from an extension attribute */
- ctx = (p1_address_ctx_t *)g_hash_table_lookup(actx->pinfo->private_table, P1_ADDRESS_CTX);
- }
+ /* First check if called from an extension attribute */
+ ctx = (p1_address_ctx_t *)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_p1, 0);
if (!ctx) {
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;