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
08f5b9f1
Commit
08f5b9f1
authored
Jan 05, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/MultiSocketMonitor: add method ClearSocketList()
parent
793962c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
MultiSocketMonitor.cxx
src/event/MultiSocketMonitor.cxx
+9
-0
MultiSocketMonitor.hxx
src/event/MultiSocketMonitor.hxx
+5
-0
AlsaMixerPlugin.cxx
src/mixer/AlsaMixerPlugin.cxx
+3
-1
No files found.
src/event/MultiSocketMonitor.cxx
View file @
08f5b9f1
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "MultiSocketMonitor.hxx"
#include "Loop.hxx"
#include <algorithm>
...
...
@@ -35,6 +36,14 @@ MultiSocketMonitor::~MultiSocketMonitor()
// TODO
}
void
MultiSocketMonitor
::
ClearSocketList
()
{
assert
(
GetEventLoop
().
IsInsideOrNull
());
fds
.
clear
();
}
#ifndef WIN32
void
...
...
src/event/MultiSocketMonitor.hxx
View file @
08f5b9f1
...
...
@@ -126,6 +126,11 @@ public:
}
/**
* Remove all sockets.
*/
void
ClearSocketList
();
/**
* Update the known sockets by invoking the given function for
* each one; its return value is the events bit mask. A
* return value of 0 means the socket will be removed from the
...
...
src/mixer/AlsaMixerPlugin.cxx
View file @
08f5b9f1
...
...
@@ -91,8 +91,10 @@ static constexpr Domain alsa_mixer_domain("alsa_mixer");
int
AlsaMixerMonitor
::
PrepareSockets
()
{
if
(
mixer
==
nullptr
)
if
(
mixer
==
nullptr
)
{
ClearSocketList
();
return
-
1
;
}
int
count
=
snd_mixer_poll_descriptors_count
(
mixer
);
if
(
count
<
0
)
...
...
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