Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f00710a5
Commit
f00710a5
authored
Feb 04, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: create UpdateService instance in glue_db_init_and_load()
parent
c9539043
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Instance.hxx
src/Instance.hxx
+6
-0
Main.cxx
src/Main.cxx
+6
-5
No files found.
src/Instance.hxx
View file @
f00710a5
...
@@ -62,6 +62,12 @@ struct Instance final
...
@@ -62,6 +62,12 @@ struct Instance final
Partition
*
partition
;
Partition
*
partition
;
Instance
()
{
#ifdef ENABLE_DATABASE
update
=
nullptr
;
#endif
}
#ifdef ENABLE_DATABASE
#ifdef ENABLE_DATABASE
void
DeleteSong
(
const
char
*
uri
);
void
DeleteSong
(
const
char
*
uri
);
...
...
src/Main.cxx
View file @
f00710a5
...
@@ -204,8 +204,13 @@ glue_db_init_and_load(void)
...
@@ -204,8 +204,13 @@ glue_db_init_and_load(void)
if
(
!
DatabaseGlobalOpen
(
error
))
if
(
!
DatabaseGlobalOpen
(
error
))
FatalError
(
error
);
FatalError
(
error
);
if
(
!
db_is_simple
())
return
true
;
instance
->
update
=
new
UpdateService
(
*
main_loop
,
db_get_simple
());
/* run database update after daemonization? */
/* run database update after daemonization? */
return
!
db_is_simple
()
||
db_exists
();
return
db_exists
();
}
}
#endif
#endif
...
@@ -459,10 +464,6 @@ int mpd_main(int argc, char *argv[])
...
@@ -459,10 +464,6 @@ int mpd_main(int argc, char *argv[])
#ifdef ENABLE_DATABASE
#ifdef ENABLE_DATABASE
const
bool
create_db
=
!
glue_db_init_and_load
();
const
bool
create_db
=
!
glue_db_init_and_load
();
instance
->
update
=
db_is_simple
()
?
new
UpdateService
(
*
main_loop
,
db_get_simple
())
:
nullptr
;
#endif
#endif
glue_sticker_init
();
glue_sticker_init
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment