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
4b044bd8
Commit
4b044bd8
authored
Jan 29, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InotifyUpdate: pass EventLoop to mpd_inotify_init()
parent
aeaf64b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
Main.cxx
src/Main.cxx
+2
-1
InotifyUpdate.cxx
src/db/update/InotifyUpdate.cxx
+3
-4
InotifyUpdate.hxx
src/db/update/InotifyUpdate.hxx
+5
-2
No files found.
src/Main.cxx
View file @
4b044bd8
...
...
@@ -504,7 +504,8 @@ int mpd_main(int argc, char *argv[])
if
(
config_get_bool
(
CONF_AUTO_UPDATE
,
false
))
{
#ifdef ENABLE_INOTIFY
if
(
mapper_has_music_directory
())
mpd_inotify_init
(
config_get_unsigned
(
CONF_AUTO_UPDATE_DEPTH
,
mpd_inotify_init
(
*
main_loop
,
config_get_unsigned
(
CONF_AUTO_UPDATE_DEPTH
,
G_MAXUINT
));
#else
FormatWarning
(
main_domain
,
...
...
src/db/update/InotifyUpdate.cxx
View file @
4b044bd8
...
...
@@ -23,7 +23,6 @@
#include "InotifyQueue.hxx"
#include "InotifyDomain.hxx"
#include "Mapper.hxx"
#include "Main.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
...
...
@@ -286,7 +285,7 @@ mpd_inotify_callback(int wd, unsigned mask,
}
void
mpd_inotify_init
(
unsigned
max_depth
)
mpd_inotify_init
(
EventLoop
&
loop
,
unsigned
max_depth
)
{
LogDebug
(
inotify_domain
,
"initializing inotify"
);
...
...
@@ -297,7 +296,7 @@ mpd_inotify_init(unsigned max_depth)
}
Error
error
;
inotify_source
=
InotifySource
::
Create
(
*
main_
loop
,
inotify_source
=
InotifySource
::
Create
(
loop
,
mpd_inotify_callback
,
nullptr
,
error
);
if
(
inotify_source
==
nullptr
)
{
...
...
@@ -321,7 +320,7 @@ mpd_inotify_init(unsigned max_depth)
recursive_watch_subdirectories
(
inotify_root
,
path
,
0
);
inotify_queue
=
new
InotifyQueue
(
*
main_
loop
);
inotify_queue
=
new
InotifyQueue
(
loop
);
LogDebug
(
inotify_domain
,
"watching music directory"
);
}
...
...
src/db/update/InotifyUpdate.hxx
View file @
4b044bd8
...
...
@@ -21,11 +21,14 @@
#define MPD_INOTIFY_UPDATE_HXX
#include "check.h"
#include "Compiler.h"
class
EventLoop
;
#ifdef HAVE_INOTIFY_INIT
void
mpd_inotify_init
(
unsigned
max_depth
);
mpd_inotify_init
(
EventLoop
&
loop
,
unsigned
max_depth
);
void
mpd_inotify_finish
(
void
);
...
...
@@ -33,7 +36,7 @@ mpd_inotify_finish(void);
#else
/* !HAVE_INOTIFY_INIT */
static
inline
void
mpd_inotify_init
(
gcc_unused
unsigned
max_depth
)
mpd_inotify_init
(
gcc_unused
EventLoop
&
loop
,
gcc_unused
unsigned
max_depth
)
{
}
...
...
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