/** \file command.c does client authentication and executes server commands */
-#include <sys/time.h> /* gettimeofday */
-#include "para.h" /* gettimeofday */
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <openssl/rc4.h>
+#include "para.h"
#include "server.cmdline.h"
#include "afs_common.h"
#include "afh.h"
#include "vss.h"
#include "send.h"
#include "rc4.h"
-#include <openssl/rc4.h>
#include "error.h"
#include "net.h"
#include "daemon.h"
if (!strcmp(cmd->name, name))
return cmd;
/* not found, look for commands supported by afs */
- for (cmd = afs_cmds; cmd; cmd++)
+ for (cmd = afs_cmds; cmd->name; cmd++)
if (!strcmp(cmd->name, name))
return cmd;
return NULL;
if (ret < 0)
return ret;
cmd = afs_cmds;
- ret = send_list_of_commands(fd, cmd, "afs");
+ return send_list_of_commands(fd, cmd, "afs");
}
/* argument given for help */
cmd = get_cmd_ptr(argv[1], &handler);