X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod_command.c;h=22b47cf3eda16070079856f725611b38171ea58f;hp=2b18837b7603de5e37b06ce579c0a604d10a34bb;hb=074b80bb23b8fa610464bd98dc4bc7dd2babc88a;hpb=c781b528c69927871c62cff33e94c87ce251bde9 diff --git a/audiod_command.c b/audiod_command.c index 2b18837b..22b47cf3 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -35,11 +35,14 @@ extern struct sched sched; extern char *stat_item_values[NUM_STAT_ITEMS]; +typedef int audiod_command_handler_t(int, int, char **); +static audiod_command_handler_t AUDIOD_COMMAND_HANDLERS; + /* Defines one command of para_audiod. */ struct audiod_command { const char *name; /* Pointer to the function that handles the command. */ - int (*handler)(int, int, char **); + audiod_command_handler_t *handler; /* One-line description. */ const char *description; /* Summary of the command line options. */ @@ -75,7 +78,7 @@ struct stat_client { int fd; /** Bitmask of those status items the client is interested in. */ uint64_t item_mask; - /** See \ref stat_client flags. s*/ + /** See \ref stat_client flags. */ unsigned flags; /** Its entry in the list of stat clients. */ struct list_head node; @@ -437,7 +440,7 @@ int handle_connect(int accept_fd, fd_set *rfds, uid_t *uid_whitelist) if (ret < 0) goto out; uid = ret; - PARA_INFO_LOG("connection from user %i, buf: %s\n", ret, buf); + PARA_INFO_LOG("connection from user %i, buf: %s\n", ret, buf); ret = check_perms(uid, uid_whitelist); if (ret < 0) goto out;