mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-18 01:50:32 -04:00
fix stupid pointer bug
This commit is contained in:
parent
9d222abd4b
commit
2f83ecb3fc
@ -363,7 +363,7 @@ int scan_path(char *path) {
|
|||||||
|
|
||||||
pde=(struct dirent *)&de;
|
pde=(struct dirent *)&de;
|
||||||
|
|
||||||
err=readdir_r(current_dir,(struct dirent *)de,&pde);
|
err=readdir_r(current_dir,(struct dirent *)&de,&pde);
|
||||||
if(err == -1) {
|
if(err == -1) {
|
||||||
DPRINTF(E_DBG,L_SCAN,"Error on readdir_r: %s\n",strerror(errno));
|
DPRINTF(E_DBG,L_SCAN,"Error on readdir_r: %s\n",strerror(errno));
|
||||||
err=errno;
|
err=errno;
|
||||||
@ -473,7 +473,7 @@ int scan_static_playlist(char *path) {
|
|||||||
DPRINTF(E_LOG,L_SCAN,"Cannot create file handle\n");
|
DPRINTF(E_LOG,L_SCAN,"Cannot create file handle\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(io_open(hfile,"file://%U",path)) {
|
if(io_open(hfile,"file://%U",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) {
|
||||||
@ -500,7 +500,7 @@ int scan_static_playlist(char *path) {
|
|||||||
|
|
||||||
memset(linebuffer,0x00,sizeof(linebuffer));
|
memset(linebuffer,0x00,sizeof(linebuffer));
|
||||||
io_buffer(hfile);
|
io_buffer(hfile);
|
||||||
|
|
||||||
len = sizeof(linebuffer);
|
len = sizeof(linebuffer);
|
||||||
while(io_readline(hfile,(unsigned char *)linebuffer,&len) && len) {
|
while(io_readline(hfile,(unsigned char *)linebuffer,&len) && len) {
|
||||||
while((linebuffer[strlen(linebuffer)-1] == '\n') ||
|
while((linebuffer[strlen(linebuffer)-1] == '\n') ||
|
||||||
@ -543,12 +543,12 @@ int scan_static_playlist(char *path) {
|
|||||||
linebuffer,perr);
|
linebuffer,perr);
|
||||||
free(perr);
|
free(perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen(linebuffer);
|
len = strlen(linebuffer);
|
||||||
}
|
}
|
||||||
io_close(hfile);
|
io_close(hfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
io_dispose(hfile);
|
io_dispose(hfile);
|
||||||
db_dispose_playlist(pm3u);
|
db_dispose_playlist(pm3u);
|
||||||
DPRINTF(E_WARN,L_SCAN|L_PL,"Done processing playlist\n");
|
DPRINTF(E_WARN,L_SCAN|L_PL,"Done processing playlist\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user