]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/recvclient.c
Simplify checks whether player thread may sleep
[empserver] / src / lib / player / recvclient.c
index 74a704ce57da03d26048723b68e7f0061090aab3..3b4f9feab716e5e0e7adbc99fa0b2c4591bebe79 100644 (file)
@@ -39,7 +39,6 @@
 #include "journal.h"
 #include "player.h"
 #include "prototypes.h"
-#include "server.h"
 
 /*
  * Receive a line of input from the current player.
@@ -80,7 +79,9 @@ recvclient(char *cmd, int size)
         * Flush all queued output before potentially sleeping in
         * io_input(), to make sure player sees the prompt.
         */
-       while (io_output(player->iop, !play_wrlock_wanted) > 0) ;
+       while (io_output(player->iop,
+                        player->may_sleep >= PLAYER_SLEEP_ON_INPUT) > 0)
+           ;
 
        /*
         * If io_output_all() blocked and got unblocked by command