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
This commit is contained in:
@@ -882,8 +882,7 @@ int handleCommands(FILE * fp, unsigned int * permission, int argArrayLength,
|
|||||||
|
|
||||||
while(node != NULL) {
|
while(node != NULL) {
|
||||||
cmd = (CommandEntry *) node->data;
|
cmd = (CommandEntry *) node->data;
|
||||||
|
if(cmd->reqPermission == (*permission & cmd->reqPermission)) {
|
||||||
if(*permission || *permission & cmd->reqPermission) {
|
|
||||||
myfprintf(fp, "command: %s\n", cmd->cmd);
|
myfprintf(fp, "command: %s\n", cmd->cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -902,7 +901,7 @@ int handleNotcommands(FILE * fp, unsigned int * permission, int argArrayLength,
|
|||||||
while(node != NULL) {
|
while(node != NULL) {
|
||||||
cmd = (CommandEntry *) node->data;
|
cmd = (CommandEntry *) node->data;
|
||||||
|
|
||||||
if(!(*permission || *permission & cmd->reqPermission)) {
|
if(cmd->reqPermission != (*permission & cmd->reqPermission)) {
|
||||||
myfprintf(fp, "command: %s\n", cmd->cmd);
|
myfprintf(fp, "command: %s\n", cmd->cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user