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:
Julien BLACHE 2009-04-05 16:20:42 +02:00
parent 59ac95cfae
commit 888bf11d2f
9 changed files with 12 additions and 12 deletions

View File

@ -614,7 +614,7 @@ int conf_read(char *file) {
DPRINTF(E_FATAL,L_CONF,"Malloc eror in io_new()\n");
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));
io_dispose(hconfig);
return CONF_E_FOPEN;
@ -1256,7 +1256,7 @@ int conf_write(void) {
if(!outfile)
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);
io_close(outfile);
io_dispose(outfile);

View File

@ -482,7 +482,7 @@ void config_handler(WS_CONNINFO *pwsc) {
}
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);
DPRINTF(E_WARN,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
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));
return;
}
if(!io_open(hfile,"file://%U",resolved_path)) {
if(!io_open(hfile,"file://%s",resolved_path)) {
ws_set_err(pwsc,E_WS_NATIVE);
DPRINTF(E_LOG,L_CONF|L_WS,"Thread %d: Error opening %s: %s\n",
ws_threadno(pwsc),resolved_path,io_errstr(pwsc));

View File

@ -173,7 +173,7 @@ void err_reopen(void) {
return;
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
* going?
*/
@ -359,7 +359,7 @@ int err_setlogfile(char *file) {
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));
err_logdest &= ~LOGDEST_LOGFILE;

View File

@ -352,7 +352,7 @@ EXPORT void pi_stream(WS_CONNINFO *pwsc, char *id) {
if(!hfile)
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 */
ws_set_err(pwsc,E_WS_NATIVE);
DPRINTF(E_WARN,L_WS,"Thread %d: Error opening %s: %s\n",

View File

@ -388,7 +388,7 @@ int scan_static_playlist(char *path) {
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,
0,&playlistid) != DB_E_SUCCESS) {
DPRINTF(E_LOG,L_SCAN,"Error adding m3u %s: %s\n",path,perr);

View File

@ -145,7 +145,7 @@ int rxml_open(RXMLHANDLE *vp, char *file,
if(!pnew->hfile)
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);
pnew->hfile = NULL;
RXML_ERROR(pnew,E_RXML_OPEN);

View File

@ -54,7 +54,7 @@ int scan_get_urlinfo(char *filename, MP3FILE *pmp3) {
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,
io_errstr(hfile));
io_dispose(hfile);

View File

@ -984,7 +984,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) {
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,
io_errstr(hfile));
io_dispose(hfile);

View File

@ -1347,7 +1347,7 @@ void ws_defaulthandler(WS_PRIVATE *pwsp, WS_CONNINFO *pwsc) {
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_dprintf(L_WS_LOG,"Error opening %s: %s",resolved_path,
io_errstr(hfile));