mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-16 00:58:18 -04:00
Merge pull request #107 from chme/mpdfixes
Fix segfault when loading playlists
This commit is contained in:
commit
83b0109a70
4
src/db.c
4
src/db.c
@ -239,7 +239,7 @@ static const ssize_t dbpli_cols_map[] =
|
|||||||
dbpli_offsetof(path),
|
dbpli_offsetof(path),
|
||||||
dbpli_offsetof(index),
|
dbpli_offsetof(index),
|
||||||
dbpli_offsetof(special_id),
|
dbpli_offsetof(special_id),
|
||||||
dbmfi_offsetof(virtual_path),
|
dbpli_offsetof(virtual_path),
|
||||||
|
|
||||||
/* items is computed on the fly */
|
/* items is computed on the fly */
|
||||||
};
|
};
|
||||||
@ -815,7 +815,7 @@ db_purge_cruft(time_t ref)
|
|||||||
void
|
void
|
||||||
db_purge_all(void)
|
db_purge_all(void)
|
||||||
{
|
{
|
||||||
char *queries[6] =
|
char *queries[5] =
|
||||||
{
|
{
|
||||||
"DELETE FROM inotify;",
|
"DELETE FROM inotify;",
|
||||||
"DELETE FROM playlistitems;",
|
"DELETE FROM playlistitems;",
|
||||||
|
1
src/db.h
1
src/db.h
@ -194,6 +194,7 @@ struct db_playlist_info {
|
|||||||
char *path;
|
char *path;
|
||||||
char *index;
|
char *index;
|
||||||
char *special_id;
|
char *special_id;
|
||||||
|
char *virtual_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define dbpli_offsetof(field) offsetof(struct db_playlist_info, field)
|
#define dbpli_offsetof(field) offsetof(struct db_playlist_info, field)
|
||||||
|
@ -2138,7 +2138,7 @@ filescanner_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
event_set(&cmdev, cmd_pipe[0], EV_READ, command_cb, NULL);
|
event_set(&cmdev, cmd_pipe[0], EV_READ, command_cb, NULL);
|
||||||
event_base_set(evbase_scan, &exitev);
|
event_base_set(evbase_scan, &cmdev);
|
||||||
event_add(&cmdev, NULL);
|
event_add(&cmdev, NULL);
|
||||||
|
|
||||||
ret = pthread_create(&tid_scan, NULL, filescanner, NULL);
|
ret = pthread_create(&tid_scan, NULL, filescanner, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user