mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 01:33:44 -04:00
Replace %U format by %s
%s format specifier means the string must be URL encoded. Replace it by a simple %s for the time being until plans about the I/O layer become clearer.
This commit is contained in:
parent
59ac95cfae
commit
888bf11d2f
@ -614,7 +614,7 @@ int conf_read(char *file) {
|
|||||||
DPRINTF(E_FATAL,L_CONF,"Malloc eror in io_new()\n");
|
DPRINTF(E_FATAL,L_CONF,"Malloc eror in io_new()\n");
|
||||||
|
|
||||||
DPRINTF(E_DBG,L_CONF,"Loading config file %s\n",conf_file);
|
DPRINTF(E_DBG,L_CONF,"Loading config file %s\n",conf_file);
|
||||||
if(!io_open(hconfig,"file://%U?ascii=1",conf_file)) {
|
if(!io_open(hconfig,"file://%s?ascii=1",conf_file)) {
|
||||||
DPRINTF(E_LOG,L_MISC,"Error opening config file: %s\n",io_errstr(hconfig));
|
DPRINTF(E_LOG,L_MISC,"Error opening config file: %s\n",io_errstr(hconfig));
|
||||||
io_dispose(hconfig);
|
io_dispose(hconfig);
|
||||||
return CONF_E_FOPEN;
|
return CONF_E_FOPEN;
|
||||||
@ -1256,7 +1256,7 @@ int conf_write(void) {
|
|||||||
if(!outfile)
|
if(!outfile)
|
||||||
DPRINTF(E_FATAL,L_CONF,"io_new failed in conf_write\n");
|
DPRINTF(E_FATAL,L_CONF,"io_new failed in conf_write\n");
|
||||||
|
|
||||||
if(io_open(outfile,"file://%U?mode=w&ascii=1",conf_main_file)) {
|
if(io_open(outfile,"file://%s?mode=w&ascii=1",conf_main_file)) {
|
||||||
retval = _conf_write(outfile,conf_main,0,NULL);
|
retval = _conf_write(outfile,conf_main,0,NULL);
|
||||||
io_close(outfile);
|
io_close(outfile);
|
||||||
io_dispose(outfile);
|
io_dispose(outfile);
|
||||||
|
@ -482,7 +482,7 @@ void config_handler(WS_CONNINFO *pwsc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DPRINTF(E_DBG,L_CONF|L_WS,"Opening %s\n",resolved_path);
|
DPRINTF(E_DBG,L_CONF|L_WS,"Opening %s\n",resolved_path);
|
||||||
if(!io_open(hfile,"file://%U",resolved_path)) {
|
if(!io_open(hfile,"file://%s",resolved_path)) {
|
||||||
ws_set_err(pwsc,E_WS_NATIVE);
|
ws_set_err(pwsc,E_WS_NATIVE);
|
||||||
DPRINTF(E_WARN,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
|
DPRINTF(E_WARN,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
|
||||||
ws_threadno(pwsc),resolved_path,io_errstr(hfile));
|
ws_threadno(pwsc),resolved_path,io_errstr(hfile));
|
||||||
@ -984,7 +984,7 @@ void config_emit_include(WS_CONNINFO *pwsc, void *value, char *arg) {
|
|||||||
ws_threadno(pwsc));
|
ws_threadno(pwsc));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!io_open(hfile,"file://%U",resolved_path)) {
|
if(!io_open(hfile,"file://%s",resolved_path)) {
|
||||||
ws_set_err(pwsc,E_WS_NATIVE);
|
ws_set_err(pwsc,E_WS_NATIVE);
|
||||||
DPRINTF(E_LOG,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
|
DPRINTF(E_LOG,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
|
||||||
ws_threadno(pwsc),resolved_path,io_errstr(pwsc));
|
ws_threadno(pwsc),resolved_path,io_errstr(pwsc));
|
||||||
|
@ -173,7 +173,7 @@ void err_reopen(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
io_close(err_file);
|
io_close(err_file);
|
||||||
if(!io_open("file://%U?mode=a&ascii=1",err_filename)) {
|
if(!io_open("file://%s?mode=a&ascii=1",err_filename)) {
|
||||||
/* what to do when you lose your logging mechanism? Keep
|
/* what to do when you lose your logging mechanism? Keep
|
||||||
* going?
|
* going?
|
||||||
*/
|
*/
|
||||||
@ -359,7 +359,7 @@ int err_setlogfile(char *file) {
|
|||||||
|
|
||||||
strncpy(err_filename,file,sizeof(err_filename)-1);
|
strncpy(err_filename,file,sizeof(err_filename)-1);
|
||||||
|
|
||||||
if(!io_open(err_file,"file://%U?mode=%s&ascii=1",err_filename,mode)) {
|
if(!io_open(err_file,"file://%s?mode=%s&ascii=1",err_filename,mode)) {
|
||||||
fprintf(stderr,"Error opening logfile: %s",io_errstr(err_file));
|
fprintf(stderr,"Error opening logfile: %s",io_errstr(err_file));
|
||||||
err_logdest &= ~LOGDEST_LOGFILE;
|
err_logdest &= ~LOGDEST_LOGFILE;
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ EXPORT void pi_stream(WS_CONNINFO *pwsc, char *id) {
|
|||||||
if(!hfile)
|
if(!hfile)
|
||||||
DPRINTF(E_FATAL,L_WS,"Cannot allocate file handle\n");
|
DPRINTF(E_FATAL,L_WS,"Cannot allocate file handle\n");
|
||||||
|
|
||||||
if(!io_open(hfile,"file://%U",pmp3->path)) {
|
if(!io_open(hfile,"file://%s",pmp3->path)) {
|
||||||
/* FIXME: ws_set_errstr */
|
/* FIXME: ws_set_errstr */
|
||||||
ws_set_err(pwsc,E_WS_NATIVE);
|
ws_set_err(pwsc,E_WS_NATIVE);
|
||||||
DPRINTF(E_WARN,L_WS,"Thread %d: Error opening %s: %s\n",
|
DPRINTF(E_WARN,L_WS,"Thread %d: Error opening %s: %s\n",
|
||||||
|
@ -388,7 +388,7 @@ int scan_static_playlist(char *path) {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(io_open(hfile,"file://%U?ascii=1",path)) {
|
if(io_open(hfile,"file://%s?ascii=1",path)) {
|
||||||
if(db_add_playlist(&perr,base_path,PL_STATICFILE,NULL,path,
|
if(db_add_playlist(&perr,base_path,PL_STATICFILE,NULL,path,
|
||||||
0,&playlistid) != DB_E_SUCCESS) {
|
0,&playlistid) != DB_E_SUCCESS) {
|
||||||
DPRINTF(E_LOG,L_SCAN,"Error adding m3u %s: %s\n",path,perr);
|
DPRINTF(E_LOG,L_SCAN,"Error adding m3u %s: %s\n",path,perr);
|
||||||
|
@ -145,7 +145,7 @@ int rxml_open(RXMLHANDLE *vp, char *file,
|
|||||||
if(!pnew->hfile)
|
if(!pnew->hfile)
|
||||||
RXML_ERROR(pnew,E_RXML_MALLOC);
|
RXML_ERROR(pnew,E_RXML_MALLOC);
|
||||||
|
|
||||||
if(!io_open(pnew->hfile, "file://%U?ascii=1", file)) {
|
if(!io_open(pnew->hfile, "file://%s?ascii=1", file)) {
|
||||||
io_dispose(pnew->hfile);
|
io_dispose(pnew->hfile);
|
||||||
pnew->hfile = NULL;
|
pnew->hfile = NULL;
|
||||||
RXML_ERROR(pnew,E_RXML_OPEN);
|
RXML_ERROR(pnew,E_RXML_OPEN);
|
||||||
|
@ -54,7 +54,7 @@ int scan_get_urlinfo(char *filename, MP3FILE *pmp3) {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!io_open(hfile,"file://%U?ascii=1",filename)) {
|
if(!io_open(hfile,"file://%s?ascii=1",filename)) {
|
||||||
DPRINTF(E_WARN,L_SCAN,"Could not open %s for reading: %s\n",filename,
|
DPRINTF(E_WARN,L_SCAN,"Could not open %s for reading: %s\n",filename,
|
||||||
io_errstr(hfile));
|
io_errstr(hfile));
|
||||||
io_dispose(hfile);
|
io_dispose(hfile);
|
||||||
|
@ -984,7 +984,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!io_open(hfile,"file://%U",filename)) {
|
if(!io_open(hfile,"file://%s",filename)) {
|
||||||
DPRINTF(E_INF,L_SCAN,"Error opening WMA file (%s): %s\n",filename,
|
DPRINTF(E_INF,L_SCAN,"Error opening WMA file (%s): %s\n",filename,
|
||||||
io_errstr(hfile));
|
io_errstr(hfile));
|
||||||
io_dispose(hfile);
|
io_dispose(hfile);
|
||||||
|
@ -1347,7 +1347,7 @@ void ws_defaulthandler(WS_PRIVATE *pwsp, WS_CONNINFO *pwsc) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!io_open(hfile,"file://%U",resolved_path)) { /* default is O_RDONLY */
|
if(!io_open(hfile,"file://%s",resolved_path)) { /* default is O_RDONLY */
|
||||||
ws_set_err(pwsc,E_WS_NATIVE); /* FIXME: ws_set_errstr */
|
ws_set_err(pwsc,E_WS_NATIVE); /* FIXME: ws_set_errstr */
|
||||||
ws_dprintf(L_WS_LOG,"Error opening %s: %s",resolved_path,
|
ws_dprintf(L_WS_LOG,"Error opening %s: %s",resolved_path,
|
||||||
io_errstr(hfile));
|
io_errstr(hfile));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user