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
338a6f2a
Commit
338a6f2a
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Walk: move UpdateConfig initialization to class UpdateService
parent
c3aa53cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
Service.cxx
src/db/update/Service.cxx
+1
-1
Service.hxx
src/db/update/Service.hxx
+3
-0
Walk.cxx
src/db/update/Walk.cxx
+3
-2
Walk.hxx
src/db/update/Walk.hxx
+2
-1
No files found.
src/db/update/Service.cxx
View file @
338a6f2a
...
...
@@ -151,7 +151,7 @@ UpdateService::StartThread(UpdateQueueItem &&i)
modified
=
false
;
next
=
std
::
move
(
i
);
walk
=
new
UpdateWalk
(
GetEventLoop
(),
listener
,
*
next
.
storage
);
walk
=
new
UpdateWalk
(
config
,
GetEventLoop
(),
listener
,
*
next
.
storage
);
update_thread
.
Start
();
...
...
src/db/update/Service.hxx
View file @
338a6f2a
...
...
@@ -21,6 +21,7 @@
#define MPD_UPDATE_SERVICE_HXX
#include "check.h"
#include "Config.hxx"
#include "Queue.hxx"
#include "event/DeferEvent.hxx"
#include "thread/Thread.hxx"
...
...
@@ -35,6 +36,8 @@ class CompositeStorage;
* This class manages the update queue and runs the update thread.
*/
class
UpdateService
final
{
const
UpdateConfig
config
;
DeferEvent
defer
;
SimpleDatabase
&
db
;
...
...
src/db/update/Walk.cxx
View file @
338a6f2a
...
...
@@ -49,9 +49,10 @@
#include <stdlib.h>
#include <errno.h>
UpdateWalk
::
UpdateWalk
(
EventLoop
&
_loop
,
DatabaseListener
&
_listener
,
UpdateWalk
::
UpdateWalk
(
const
UpdateConfig
&
_config
,
EventLoop
&
_loop
,
DatabaseListener
&
_listener
,
Storage
&
_storage
)
noexcept
:
cancel
(
false
),
:
c
onfig
(
_config
),
c
ancel
(
false
),
storage
(
_storage
),
editor
(
_loop
,
_listener
)
{
...
...
src/db/update/Walk.hxx
View file @
338a6f2a
...
...
@@ -56,7 +56,8 @@ class UpdateWalk final {
DatabaseEditor
editor
;
public
:
UpdateWalk
(
EventLoop
&
_loop
,
DatabaseListener
&
_listener
,
UpdateWalk
(
const
UpdateConfig
&
_config
,
EventLoop
&
_loop
,
DatabaseListener
&
_listener
,
Storage
&
_storage
)
noexcept
;
/**
...
...
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