Skip to content

Commit 060ba47

Browse files
Merge pull request #528 from AtariDreams/backchannel
Fix backchannel status checking bugs
2 parents c0e0e07 + 178f07d commit 060ba47

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cups/backchannel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cupsBackChannelRead(char *buffer, /* I - Buffer to read into */
6565
}
6666
while (status < 0 && errno != EINTR && errno != EAGAIN);
6767

68-
if (status < 0)
68+
if (status <= 0)
6969
return (-1); /* Timeout! */
7070

7171
/*
@@ -173,8 +173,8 @@ cups_setup(fd_set *set, /* I - Set for select() */
173173
struct timeval *tval, /* I - Timer value */
174174
double timeout) /* I - Timeout in seconds */
175175
{
176-
tval->tv_sec = (int)timeout;
177-
tval->tv_usec = (int)(1000000.0 * (timeout - tval->tv_sec));
176+
tval->tv_sec = (time_t)timeout;
177+
tval->tv_usec = (suseconds_t)(1000000.0 * (timeout - tval->tv_sec));
178178

179179
FD_ZERO(set);
180180
FD_SET(3, set);

0 commit comments

Comments
 (0)