Skip to content

Commit 2f372b2

Browse files
committed
Fix an SNMP bug in the IPP backend.
1 parent ed6ac03 commit 2f372b2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Changes in CUPS v2.4.17 (YYYY-MM-DD)
3030
- Fixed possible use-after-free in `cupsdReadClient()` (Issue #1454)
3131
- Fixed a document format bug in the IPP backend (Issue #1457)
3232
- Fixed a bug when then `ippFindXxx` and `ippSetXxx` functions were mixed.
33+
- Fixed the mapping of supply type keywords to SNMP names.
34+
- Fixed a bug in the IPP backend when SNMP was disabled.
3335

3436

3537
Changes in CUPS v2.4.16 (2025-12-04)

backend/ipp.c

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

16991699
FD_ZERO(&input);
17001700
FD_SET(fd, &input);
1701-
FD_SET(snmp_fd, &input);
1701+
if (snmp_fd >= 0)
1702+
FD_SET(snmp_fd, &input);
17021703
FD_SET(CUPS_SC_FD, &input);
17031704

17041705
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
17051706
NULL) <= 0 && !job_canceled);
17061707

1707-
if (FD_ISSET(snmp_fd, &input))
1708+
if (snmp_fd >= 0 && FD_ISSET(snmp_fd, &input))
17081709
backendCheckSideChannel(snmp_fd, http->hostaddr);
17091710

17101711
if (FD_ISSET(fd, &input))

0 commit comments

Comments
 (0)