aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-09-16 17:42:01 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-09-16 17:42:01 +0000
commitbdf5a44fa5460f37d4424d8e2b9caac038af6d8a (patch)
tree0c3f8e31a37a28b063f8ef1a4aae51cb4c890acf
parente428e1d73406ef6070000b98c9fce863a7aa1563 (diff)
There's no preference setting for the SMTP TCP port (and SMTP has a
well-known port), so we remove the extra code to handle changing it - if it ever becomes useful to have the port number settable, we can put it back. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8485 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--packet-smtp.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/packet-smtp.c b/packet-smtp.c
index 59a5c66191..6bd232ff36 100644
--- a/packet-smtp.c
+++ b/packet-smtp.c
@@ -1,7 +1,7 @@
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.34 2003/06/11 18:22:12 guy Exp $
+ * $Id: packet-smtp.c,v 1.35 2003/09/16 17:42:01 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -42,8 +42,6 @@
#define TCP_PORT_SMTP 25
-void proto_reg_handoff_smtp(void);
-
static int proto_smtp = -1;
static int hf_smtp_req = -1;
@@ -56,8 +54,6 @@ static int hf_smtp_rsp_parameter = -1;
static int ett_smtp = -1;
static int ett_smtp_cmdresp = -1;
-static int global_smtp_tcp_port = TCP_PORT_SMTP;
-
/* desegmentation of SMTP command and response lines */
static gboolean smtp_desegment = TRUE;
@@ -590,25 +586,8 @@ proto_register_smtp(void)
void
proto_reg_handoff_smtp(void)
{
- static int smtp_prefs_initialized = FALSE;
- static dissector_handle_t smtp_handle;
- static int tcp_port = 0;
-
- if (!smtp_prefs_initialized) {
-
- smtp_handle = create_dissector_handle(dissect_smtp, proto_smtp);
-
- smtp_prefs_initialized = TRUE;
-
- }
- else {
-
- dissector_delete("tcp.port", tcp_port, smtp_handle);
-
- }
-
- tcp_port = global_smtp_tcp_port;
-
- dissector_add("tcp.port", global_smtp_tcp_port, smtp_handle);
+ dissector_handle_t smtp_handle;
+ smtp_handle = create_dissector_handle(dissect_smtp, proto_smtp);
+ dissector_add("tcp.port", TCP_PORT_SMTP, smtp_handle);
}