CVS: cvs.openbsd.org: src
Martijn van Duren <[email protected]>
| Newsgroups | gmane.os.openbsd.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVSROOT: /cvs Module name: src Changes by: [email protected] 2026/07/01 23:23:29 Modified files: usr.sbin/snmpd : proc.c snmpd.h Log message: snmpd: convert proc.c to new imsg API (sync with relayd proc.c) Replace IMSG_SIZE_CHECK() + memcpy() with imsg_get_data(), which does the length check and copy in one call. Use the imsg accessors (imsg_get_*) instead of touching imsg.hdr directly and imsgbuf_get()/imsgbuf_read() instead of imsg_get(). Rewrite proc_forward_imsg() to use imsg_forward() per target imsgbuf instead of re-composing via proc_compose_imsg(); arm the write event with imsg_event_add() after each forward. proc_forward_imsg() never forwarded an fd, and imsg_forward() rewinds the buffer internally, so multiple forwards per message keep working. Drop the now-unused n parameter (no callers). OK rsadowski@