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
b62a8e3e
Commit
b62a8e3e
authored
Sep 25, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: add COMMAND_RETURN_IDLE
Eliminate the hack in handle_idle().
parent
e4724093
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
OtherCommands.cxx
src/OtherCommands.cxx
+1
-2
client_event.c
src/client_event.c
+1
-0
command.h
src/command.h
+6
-0
No files found.
src/OtherCommands.cxx
View file @
b62a8e3e
...
@@ -310,6 +310,5 @@ handle_idle(struct client *client,
...
@@ -310,6 +310,5 @@ handle_idle(struct client *client,
/* enable "idle" mode on this client */
/* enable "idle" mode on this client */
client_idle_wait
(
client
,
flags
);
client_idle_wait
(
client
,
flags
);
/* return value is "1" so the caller won't print "OK" */
return
COMMAND_RETURN_IDLE
;
return
(
enum
command_return
)
1
;
}
}
src/client_event.c
View file @
b62a8e3e
...
@@ -77,6 +77,7 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition,
...
@@ -77,6 +77,7 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source, GIOCondition condition,
ret
=
client_read
(
client
);
ret
=
client_read
(
client
);
switch
(
ret
)
{
switch
(
ret
)
{
case
COMMAND_RETURN_OK
:
case
COMMAND_RETURN_OK
:
case
COMMAND_RETURN_IDLE
:
case
COMMAND_RETURN_ERROR
:
case
COMMAND_RETURN_ERROR
:
break
;
break
;
...
...
src/command.h
View file @
b62a8e3e
...
@@ -32,6 +32,12 @@ enum command_return {
...
@@ -32,6 +32,12 @@ enum command_return {
COMMAND_RETURN_OK
,
COMMAND_RETURN_OK
,
/**
/**
* The connection is now in "idle" mode, and no response shall
* be generated.
*/
COMMAND_RETURN_IDLE
,
/**
* There was an error. The "ACK" response was sent to the
* There was an error. The "ACK" response was sent to the
* client.
* client.
*/
*/
...
...
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