diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-11-11 15:05:00 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-11-11 15:05:00 +0000 |
commit | 488933518c86344204ad98f820fc15444fe36ef1 (patch) | |
tree | 578a1d4f3a0550bda509079faee75abdc7716c72 /asn1/p7 | |
parent | 41723a5ef23c6a87baefa58a4ca69ae0d864f132 (diff) |
Small cleanups mostly related to proto_reg_handoff
svn path=/trunk/; revision=26750
Diffstat (limited to 'asn1/p7')
-rw-r--r-- | asn1/p7/packet-p7-template.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asn1/p7/packet-p7-template.c b/asn1/p7/packet-p7-template.c index c8d65c1c29..7d358d91be 100644 --- a/asn1/p7/packet-p7-template.c +++ b/asn1/p7/packet-p7-template.c @@ -50,8 +50,7 @@ #define PFNAME "p7" static guint global_p7_tcp_port = 102; -static guint tcp_port = 0; -static dissector_handle_t tpkt_handle = NULL; +static dissector_handle_t tpkt_handle; static const char *object_identifier_id = NULL; /* attribute identifier */ static int seqno = 0; @@ -145,10 +144,11 @@ void proto_reg_handoff_p7(void) { void prefs_register_p7(void) { + static guint tcp_port = 0; /* de-register the old port */ /* port 102 is registered by TPKT - don't undo this! */ - if((tcp_port != 102) && tpkt_handle) + if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle) dissector_delete("tcp.port", tcp_port, tpkt_handle); /* Set our port number for future use */ |