bsnmpd: Only refresh devtree if devd event is a new or removed device.
It makes sense to refresh the tree only when a device is inserted or removed, otherwise bsnmpd wastes lot of CPU. PR: 209368 MFC after: 1 week
This commit is contained in:
parent
0f23ab8aac
commit
7e7315b542
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325067
@ -479,6 +479,8 @@ devd_socket_callback(int fd, void *arg __unused)
|
||||
} else {
|
||||
if (read_len == sizeof(buf))
|
||||
goto again;
|
||||
/* Only refresh device table on a device add or remove event. */
|
||||
if (buf[0] == '+' || buf[0] == '-')
|
||||
refresh_device_tbl(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user