]> git.tue.mpg.de Git - paraslash.git/commitdiff
command.c: Fix get_cmd_pointer.
authorAndre Noll <maan@systemlinux.org>
Wed, 31 Oct 2007 00:17:47 +0000 (01:17 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 31 Oct 2007 00:17:47 +0000 (01:17 +0100)
The old code did not set the handler for afs commands at all. Bad.

command.c

index e294e87c9cbbe6e9ce1e2358ceb9b10e30035a09..3a58300e22fec2d0d64a403f0ca814cb0f37a9d8 100644 (file)
--- a/command.c
+++ b/command.c
@@ -376,13 +376,16 @@ static struct server_command *get_cmd_ptr(const char *name, char **handler)
        for (cmd = server_cmds; cmd->name; cmd++)
                if (!strcmp(cmd->name, name)) {
                        if (handler)
-                               *handler = para_strdup("para_server"); /* server commands */
+                               *handler = para_strdup("server"); /* server commands */
                        return cmd;
                }
        /* not found, look for commands supported by afs */
        for (cmd = afs_cmds; cmd->name; cmd++)
-               if (!strcmp(cmd->name, name))
+               if (!strcmp(cmd->name, name)) {
+                       if (handler)
+                               *handler = para_strdup("afs");
                        return cmd;
+               }
        return NULL;
 }