summaryrefslogtreecommitdiff
path: root/minecctl/minecctl-rcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecctl/minecctl-rcon.c')
-rw-r--r--minecctl/minecctl-rcon.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/minecctl/minecctl-rcon.c b/minecctl/minecctl-rcon.c
index 27c586c..96d3522 100644
--- a/minecctl/minecctl-rcon.c
+++ b/minecctl/minecctl-rcon.c
@@ -133,11 +133,8 @@ rcon_login(struct cfg *cfg, struct server *server)
send_msg(fd, buf, sizeof(buf), RCON_PACKET_LOGIN, server->rcon_password,
&rtype, &reply);
- /* An rcon password isn't exactly super-secret, but can't hurt */
explicit_bzero(buf, sizeof(buf));
- explicit_bzero(server->rcon_password, strlen(server->rcon_password));
- xfree(server->rcon_password);
- server->rcon_password = NULL;
+ free_password(&server->rcon_password);
if (rtype == RCON_PACKET_LOGIN_OK)
verbose("%s: login ok", server->name);
@@ -236,20 +233,6 @@ get_one_status(int fd, char *buf, size_t len, const char *cmd,
return false;
}
-static struct server *
-get_default_server(struct cfg *cfg)
-{
- struct server *server;
-
- server = list_first_entry_or_null(&cfg->servers, struct server, list);
- if (!server)
- die("No servers defined");
-
- read_server_config(server);
-
- return server;
-}
-
void
do_status(struct cfg *cfg) {
char buf[4096];