Skip to content

Commit 3ff5e29

Browse files
committed
Fix an SNMP bug in the IPP backend.
1 parent 70ac353 commit 3ff5e29

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backend/ipp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,13 +1674,14 @@ main(int argc, /* I - Number of command-line args */
16741674

16751675
FD_ZERO(&input);
16761676
FD_SET(fd, &input);
1677-
FD_SET(snmp_fd, &input);
1677+
if (snmp_fd >= 0)
1678+
FD_SET(snmp_fd, &input);
16781679
FD_SET(CUPS_SC_FD, &input);
16791680

16801681
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
16811682
NULL) <= 0 && !job_canceled);
16821683

1683-
if (FD_ISSET(snmp_fd, &input))
1684+
if (snmp_fd >= 0 && FD_ISSET(snmp_fd, &input))
16841685
backendCheckSideChannel(snmp_fd, http->hostaddr);
16851686

16861687
if (FD_ISSET(fd, &input))

0 commit comments

Comments
 (0)