command: add COMMAND_RETURN_IDLE
Eliminate the hack in handle_idle().
This commit is contained in:
parent
e47240931a
commit
b62a8e3e3e
@ -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;
|
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -31,6 +31,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.
|
||||||
|
Loading…
Reference in New Issue
Block a user