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
32064a23
Commit
32064a23
authored
Jun 03, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neighbor/udisks2: move Open()/Close() calls into the I/O thread
Fixes assertion failure.
parent
c60b50b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
UdisksNeighborPlugin.cxx
src/neighbor/plugins/UdisksNeighborPlugin.cxx
+18
-4
No files found.
src/neighbor/plugins/UdisksNeighborPlugin.cxx
View file @
32064a23
...
...
@@ -31,6 +31,7 @@
#include "neighbor/Explorer.hxx"
#include "neighbor/Listener.hxx"
#include "neighbor/Info.hxx"
#include "event/Call.hxx"
#include "thread/Mutex.hxx"
#include "thread/SafeSingleton.hxx"
#include "util/Domain.hxx"
...
...
@@ -107,6 +108,9 @@ public:
List
GetList
()
const
noexcept
override
;
private
:
void
DoOpen
();
void
DoClose
()
noexcept
;
void
Insert
(
UdisksObject
&&
o
)
noexcept
;
void
Remove
(
const
std
::
string
&
path
)
noexcept
;
...
...
@@ -125,8 +129,8 @@ private:
void
*
user_data
)
noexcept
;
};
void
UdisksNeighborExplorer
::
Open
()
inline
void
UdisksNeighborExplorer
::
Do
Open
()
{
using
namespace
ODBus
;
...
...
@@ -160,10 +164,14 @@ UdisksNeighborExplorer::Open()
}
void
UdisksNeighborExplorer
::
Close
()
noexcept
UdisksNeighborExplorer
::
Open
()
{
using
namespace
ODBus
;
BlockingCall
(
GetEventLoop
(),
[
this
](){
DoOpen
();
});
}
inline
void
UdisksNeighborExplorer
::
DoClose
()
noexcept
{
if
(
pending_list_call
)
{
pending_list_call
.
Cancel
();
}
...
...
@@ -174,6 +182,12 @@ UdisksNeighborExplorer::Close() noexcept
dbus_glue
.
Destruct
();
}
void
UdisksNeighborExplorer
::
Close
()
noexcept
{
BlockingCall
(
GetEventLoop
(),
[
this
](){
DoClose
();
});
}
template
<
typename
I
>
gcc_pure
static
const
char
*
...
...
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