aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/dap/packet-dap-template.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-11-11 15:05:00 +0000
committerBill Meier <wmeier@newsguy.com>2008-11-11 15:05:00 +0000
commit488933518c86344204ad98f820fc15444fe36ef1 (patch)
tree578a1d4f3a0550bda509079faee75abdc7716c72 /asn1/dap/packet-dap-template.c
parent41723a5ef23c6a87baefa58a4ca69ae0d864f132 (diff)
Small cleanups mostly related to proto_reg_handoff
svn path=/trunk/; revision=26750
Diffstat (limited to 'asn1/dap/packet-dap-template.c')
-rw-r--r--asn1/dap/packet-dap-template.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/asn1/dap/packet-dap-template.c b/asn1/dap/packet-dap-template.c
index b77a6c02d4..fa5d009dce 100644
--- a/asn1/dap/packet-dap-template.c
+++ b/asn1/dap/packet-dap-template.c
@@ -58,9 +58,8 @@
#define PFNAME "dap"
static guint global_dap_tcp_port = 102;
-static guint tcp_port = 0;
-static dissector_handle_t tpkt_handle = NULL;
-void prefs_register_dap(void); /* forwad declaration for use in preferences registration */
+static dissector_handle_t tpkt_handle;
+void prefs_register_dap(void); /* forward declaration for use in preferences registration */
/* Initialize the protocol and registered fields */
@@ -153,15 +152,15 @@ void proto_reg_handoff_dap(void) {
/* AttributeTypes */
x509if_register_fmt(hf_dap_present, "= *");
-
}
void prefs_register_dap(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 */