The old code did not set the handler for afs commands at all. Bad.
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;
}