aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-newmail.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2006-10-03 05:50:28 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2006-10-03 05:50:28 +0000
commit80a73e085e831cc1b18b1781b1f36557317e006b (patch)
treecfea2238df10d966f430330f953c561f2ec1b753 /epan/dissectors/packet-newmail.c
parentc3eeaf5135ce8f2ccbac3543bc903b22f748a87b (diff)
From Stephen Fisher:
always register itself on the port from the preferences (defaults to 0) upon launch. This allows the user to right-click and use decode as. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19403 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-newmail.c')
-rw-r--r--epan/dissectors/packet-newmail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-newmail.c b/epan/dissectors/packet-newmail.c
index d80f034673..2f64eac44c 100644
--- a/epan/dissectors/packet-newmail.c
+++ b/epan/dissectors/packet-newmail.c
@@ -128,9 +128,17 @@ proto_register_newmail(void)
void
proto_reg_handoff_newmail(void)
{
+ static gboolean inited = FALSE;
+
dissector_handle_t newmail_handle;
newmail_handle = find_dissector("newmail");
+
+ if(!inited) {
+ dissector_add("udp.port", preference_default_port, newmail_handle);
+ preference_default_port_last = preference_default_port;
+ inited = TRUE;
+ }
if(preference_default_port != preference_default_port_last) {
/* Unregister the last setting */