aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-exec.c')
-rw-r--r--epan/dissectors/packet-exec.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-exec.c b/epan/dissectors/packet-exec.c
index 27f65db762..6c1437d49c 100644
--- a/epan/dissectors/packet-exec.c
+++ b/epan/dissectors/packet-exec.c
@@ -29,17 +29,17 @@ void proto_register_exec(void);
void proto_reg_handoff_exec(void);
/* Initialize the protocol and registered fields */
-static int proto_exec = -1;
+static int proto_exec;
-static int hf_exec_stderr_port = -1;
-static int hf_exec_username = -1;
-static int hf_exec_password = -1;
-static int hf_exec_command = -1;
-static int hf_exec_client_server_data = -1;
-static int hf_exec_server_client_data = -1;
+static int hf_exec_stderr_port;
+static int hf_exec_username;
+static int hf_exec_password;
+static int hf_exec_command;
+static int hf_exec_client_server_data;
+static int hf_exec_server_client_data;
/* Initialize the subtree pointers */
-static gint ett_exec = -1;
+static gint ett_exec;
#define EXEC_STDERR_PORT_LEN 5
#define EXEC_USERNAME_LEN 16
@@ -365,6 +365,9 @@ proto_register_exec(void)
/* Register the protocol name and description */
proto_exec = proto_register_protocol("Remote Process Execution", "EXEC", "exec");
+ /* Register the dissector function */
+ register_dissector("exec", dissect_exec, proto_exec);
+
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_exec, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -387,10 +390,7 @@ proto_register_exec(void)
void
proto_reg_handoff_exec(void)
{
- dissector_handle_t exec_handle;
-
- exec_handle = create_dissector_handle(dissect_exec, proto_exec);
- dissector_add_uint_with_preference("tcp.port", EXEC_PORT, exec_handle);
+ dissector_add_uint_with_preference("tcp.port", EXEC_PORT, find_dissector("exec"));
}
/*