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
86c7ab29
Commit
86c7ab29
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/Idle: pass Response instead of Client to WriteIdleResponse()
parent
db89e5ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ClientIdle.cxx
src/client/ClientIdle.cxx
+6
-5
No files found.
src/client/ClientIdle.cxx
View file @
86c7ab29
...
...
@@ -19,21 +19,21 @@
#include "config.h"
#include "ClientInternal.hxx"
#include "Response.hxx"
#include "Idle.hxx"
#include <assert.h>
static
void
WriteIdleResponse
(
Client
&
client
,
unsigned
flags
)
noexcept
WriteIdleResponse
(
Response
&
r
,
unsigned
flags
)
noexcept
{
const
char
*
const
*
idle_names
=
idle_get_names
();
for
(
unsigned
i
=
0
;
idle_names
[
i
];
++
i
)
{
if
(
flags
&
(
1
<<
i
))
client_printf
(
client
,
"changed: %s
\n
"
,
idle_names
[
i
]);
r
.
Format
(
"changed: %s
\n
"
,
idle_names
[
i
]);
}
client
.
Write
(
"OK
\n
"
);
r
.
Write
(
"OK
\n
"
);
}
void
...
...
@@ -45,7 +45,8 @@ Client::IdleNotify() noexcept
unsigned
flags
=
std
::
exchange
(
idle_flags
,
0
)
&
idle_subscriptions
;
idle_waiting
=
false
;
WriteIdleResponse
(
*
this
,
flags
);
Response
r
(
*
this
,
0
);
WriteIdleResponse
(
r
,
flags
);
timeout_event
.
Schedule
(
client_timeout
);
}
...
...
This diff is collapsed.
Click to expand it.
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