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
5ebe23e4
Commit
5ebe23e4
authored
Feb 24, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/upnp/Discovery: use class IntrusiveList
parent
aa227cde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
Discovery.cxx
src/lib/upnp/Discovery.cxx
+2
-2
Discovery.hxx
src/lib/upnp/Discovery.hxx
+4
-7
No files found.
src/lib/upnp/Discovery.cxx
View file @
5ebe23e4
...
...
@@ -49,8 +49,8 @@ void
UPnPDeviceDirectory
::
Downloader
::
Destroy
()
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
parent
.
mutex
);
parent
.
downloaders
.
erase_and_dispose
(
parent
.
downloaders
.
iterator_to
(
*
this
),
DeleteDisposer
())
;
unlink
();
delete
this
;
}
void
...
...
src/lib/upnp/Discovery.hxx
View file @
5ebe23e4
...
...
@@ -28,8 +28,7 @@
#include "lib/curl/Request.hxx"
#include "thread/Mutex.hxx"
#include "event/DeferEvent.hxx"
#include <boost/intrusive/list.hpp>
#include "util/IntrusiveList.hxx"
#include <list>
#include <vector>
...
...
@@ -80,9 +79,8 @@ class UPnPDeviceDirectory final : UpnpCallback {
};
class
Downloader
final
:
public
boost
::
intrusive
::
list_base_hook
<
boost
::
intrusive
::
link_mode
<
boost
::
intrusive
::
normal_link
>>
,
CurlResponseHandler
{
:
public
IntrusiveListHook
,
CurlResponseHandler
{
DeferEvent
defer_start_event
;
UPnPDeviceDirectory
&
parent
;
...
...
@@ -132,8 +130,7 @@ class UPnPDeviceDirectory final : UpnpCallback {
/**
* Protected by #mutex.
*/
boost
::
intrusive
::
list
<
Downloader
,
boost
::
intrusive
::
constant_time_size
<
false
>>
downloaders
;
IntrusiveList
<
Downloader
>
downloaders
;
/**
* Protected by #mutex.
...
...
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