mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 09:43:45 -04:00
Fix configfile errors
This commit is contained in:
parent
6a824aa09a
commit
c92b0ed841
@ -324,8 +324,10 @@ void config_handler(WS_CONNINFO *pwsc) {
|
|||||||
int size;
|
int size;
|
||||||
|
|
||||||
size = PATH_MAX;
|
size = PATH_MAX;
|
||||||
if(!conf_get_string("general","web_root","",web_root,&size))
|
if(conf_get_string("general","web_root",NULL,
|
||||||
DPRINTF(E_FATAL,L_CONF,"No web root!\n"); /* shouldnt' happen */
|
web_root,&size) != CONF_E_SUCCESS) {
|
||||||
|
DPRINTF(E_FATAL,L_CONF,"No web root!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DPRINTF(E_DBG,L_CONF|L_WS,"Entering config_handler\n");
|
DPRINTF(E_DBG,L_CONF|L_WS,"Entering config_handler\n");
|
||||||
@ -422,7 +424,8 @@ int config_auth(char *user, char *password) {
|
|||||||
char adminpassword[80];
|
char adminpassword[80];
|
||||||
int size = sizeof(adminpassword);
|
int size = sizeof(adminpassword);
|
||||||
|
|
||||||
if(!conf_get_string("general","admin_pw","",adminpassword,&size)) {
|
if(conf_get_string("general","admin_pw","",adminpassword,
|
||||||
|
&size) != CONF_E_SUCCESS) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -776,7 +779,8 @@ void config_emit_include(WS_CONNINFO *pwsc, void *value, char *arg) {
|
|||||||
int size;
|
int size;
|
||||||
|
|
||||||
size = sizeof(web_root);
|
size = sizeof(web_root);
|
||||||
if(!conf_get_string("general","web_root","/tmp",web_root,&size)) {
|
if(conf_get_string("general","web_root",NULL,web_root,
|
||||||
|
&size) != CONF_E_SUCCESS) {
|
||||||
DPRINTF(E_FATAL,L_WS,"No web root!\n");
|
DPRINTF(E_FATAL,L_WS,"No web root!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,8 +96,8 @@ int da_get_image_fd(char *filename) {
|
|||||||
int size;
|
int size;
|
||||||
|
|
||||||
size = sizeof(artfilename);
|
size = sizeof(artfilename);
|
||||||
if(!conf_get_string("general","art_filename","_folderOpenImage.jpg",
|
if(conf_get_string("general","art_filename","_folderOpenImage.jpg",
|
||||||
artfilename,&size)) {
|
artfilename,&size) != CONF_E_SUCCESS) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,8 +302,8 @@ off_t da_aac_insert_covr_atom(off_t extra_size, int out_fd, FILE *aac_fp,
|
|||||||
int size;
|
int size;
|
||||||
|
|
||||||
size = sizeof(artfilename);
|
size = sizeof(artfilename);
|
||||||
if(!conf_get_string("general","art_filename","_folderOpenImage.jpg",
|
if(conf_get_string("general","art_filename","_folderOpenImage.jpg",
|
||||||
artfilename,&size)) {
|
artfilename,&size) != CONF_E_SUCCESS) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user