Replace the per-iop input_timeout by per-function timeouts
Commit08b94556
(v4.3.20) added io_open() parameter input_timeout. It applies to io_input() and, since commit904822e3
, to io_close(). Add timeout parameters to these functions instead.
This commit is contained in:
parent
0513ec136b
commit
a96b400da3
5 changed files with 32 additions and 29 deletions
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include "empio.h"
|
||||
#include "journal.h"
|
||||
#include "optlist.h"
|
||||
#include "player.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
|
@ -60,6 +61,7 @@ int
|
|||
recvclient(char *cmd, int size)
|
||||
{
|
||||
int count, res;
|
||||
struct timeval timeout;
|
||||
|
||||
count = -1;
|
||||
while (!player->aborted) {
|
||||
|
@ -90,7 +92,9 @@ recvclient(char *cmd, int size)
|
|||
if (player->aborted)
|
||||
break;
|
||||
|
||||
res = io_input(player->iop, 1);
|
||||
timeout.tv_sec = minutes(max_idle);
|
||||
timeout.tv_usec = 0;
|
||||
res = io_input(player->iop, &timeout);
|
||||
if (res > 0)
|
||||
;
|
||||
else if (res < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue