Codebase list squeezelite / 5a23374
fix segfault with back debug options Adrian Smith 11 years ago
1 changed file(s) with 12 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
108108 char *l = strtok(optarg, "=");
109109 char *v = strtok(NULL, "=");
110110 log_level new = WARN;
111 if (!strcmp(v, "info")) new = INFO;
112 if (!strcmp(v, "debug")) new = DEBUG;
113 if (!strcmp(v, "sdebug")) new = SDEBUG;
114 if (!strcmp(l, "all") || !strcmp(l, "slimproto")) log_slimproto = new;
115 if (!strcmp(l, "all") || !strcmp(l, "stream")) log_stream = new;
116 if (!strcmp(l, "all") || !strcmp(l, "decode")) log_decode = new;
117 if (!strcmp(l, "all") || !strcmp(l, "output")) log_output = new;
111 if (l && v) {
112 if (!strcmp(v, "info")) new = INFO;
113 if (!strcmp(v, "debug")) new = DEBUG;
114 if (!strcmp(v, "sdebug")) new = SDEBUG;
115 if (!strcmp(l, "all") || !strcmp(l, "slimproto")) log_slimproto = new;
116 if (!strcmp(l, "all") || !strcmp(l, "stream")) log_stream = new;
117 if (!strcmp(l, "all") || !strcmp(l, "decode")) log_decode = new;
118 if (!strcmp(l, "all") || !strcmp(l, "output")) log_output = new;
119 } else {
120 usage(argv[0]);
121 exit(0);
122 }
118123 }
119124 break;
120125 case 'm':