diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-23 20:54:20 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-23 20:54:20 +0000 |
commit | 23eef1f73292a3a2b555cb81cd4e4e10edf19ec5 (patch) | |
tree | 01680de95cf8e5d0d54cee1a76dd7996c10fd573 /src | |
parent | e034e2889cfb727c5c1d78f356d825ef0b97b915 (diff) | |
download | mpd-23eef1f73292a3a2b555cb81cd4e4e10edf19ec5.tar.gz mpd-23eef1f73292a3a2b555cb81cd4e4e10edf19ec5.tar.xz mpd-23eef1f73292a3a2b555cb81cd4e4e10edf19ec5.zip |
fix logic for commands and notcommands for real this time
git-svn-id: https://svn.musicpd.org/mpd/trunk@2740 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/command.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/command.c b/src/command.c index c118be227..2c307e0bb 100644 --- a/src/command.c +++ b/src/command.c @@ -882,8 +882,7 @@ int handleCommands(FILE * fp, unsigned int * permission, int argArrayLength, while(node != NULL) { cmd = (CommandEntry *) node->data; - - if(*permission || *permission & cmd->reqPermission) { + if(cmd->reqPermission == (*permission & cmd->reqPermission)) { myfprintf(fp, "command: %s\n", cmd->cmd); } @@ -902,7 +901,7 @@ int handleNotcommands(FILE * fp, unsigned int * permission, int argArrayLength, while(node != NULL) { cmd = (CommandEntry *) node->data; - if(!(*permission || *permission & cmd->reqPermission)) { + if(cmd->reqPermission != (*permission & cmd->reqPermission)) { myfprintf(fp, "command: %s\n", cmd->cmd); } |