mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 01:46:02 -05:00
bug in setting error mask
This commit is contained in:
parent
e24b0b7a66
commit
bb14605b5c
12
src/err.c
12
src/err.c
@ -186,9 +186,9 @@ void err_setdest(char *app, int destination) {
|
||||
* \param list comma separated list of modules to debug.
|
||||
*/
|
||||
extern int err_setdebugmask(char *list) {
|
||||
char **pcurrent=err_categorylist;
|
||||
unsigned int rack;
|
||||
char *token, *str, *last;
|
||||
int index;
|
||||
|
||||
err_debugmask=0x80000000; /* always log L_MISC! */
|
||||
str=list;
|
||||
@ -199,12 +199,14 @@ extern int err_setdebugmask(char *list) {
|
||||
|
||||
if(token) {
|
||||
rack=1;
|
||||
while((*pcurrent) && (strcasecmp(*pcurrent,token))) {
|
||||
index=0;
|
||||
while((err_categorylist[index]) &&
|
||||
(strcasecmp(err_categorylist[index],token))) {
|
||||
rack <<= 1;
|
||||
pcurrent++;
|
||||
index++;
|
||||
}
|
||||
|
||||
if(!pcurrent) {
|
||||
if(!err_categorylist[index]) {
|
||||
DPRINTF(E_LOG,L_MISC,"Unknown module: %s\n",token);
|
||||
return 1;
|
||||
} else {
|
||||
@ -214,7 +216,7 @@ extern int err_setdebugmask(char *list) {
|
||||
} else break; /* !token */
|
||||
}
|
||||
|
||||
DPRINTF(E_LOG,L_MISC,"Debug mask is 0x%08x\n",err_debugmask);
|
||||
DPRINTF(E_INF,L_MISC,"Debug mask is 0x%08x\n",err_debugmask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user