Commit e034e288 authored by Warren Dukes's avatar Warren Dukes

fix a little logic bomb in commands && notcommands

git-svn-id: https://svn.musicpd.org/mpd/trunk@2739 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 498fe127
...@@ -883,7 +883,7 @@ int handleCommands(FILE * fp, unsigned int * permission, int argArrayLength, ...@@ -883,7 +883,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(*permission & cmd->reqPermission) { if(*permission || *permission & cmd->reqPermission) {
myfprintf(fp, "command: %s\n", cmd->cmd); myfprintf(fp, "command: %s\n", cmd->cmd);
} }
...@@ -902,7 +902,7 @@ int handleNotcommands(FILE * fp, unsigned int * permission, int argArrayLength, ...@@ -902,7 +902,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 & cmd->reqPermission)) { if(!(*permission || *permission & cmd->reqPermission)) {
myfprintf(fp, "command: %s\n", cmd->cmd); myfprintf(fp, "command: %s\n", cmd->cmd);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment