]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use full buffer size in read(2) call, there is no need to preserve the
authorAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 11 Jul 2011 12:51:35 +0000 (12:51 +0000)
committerAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 11 Jul 2011 12:51:35 +0000 (12:51 +0000)
commit8f64015c0ea8a39210bedb42730fbf7ce10d2e11
tree1546f7401cb63ff18c37a0ba635da6dc4342b085
parent608be0d0ba68c1deb512ceddae2bc9250ede8a69
Use full buffer size in read(2) call, there is no need to preserve the
last byte of the buffer.

Since we call refresh_device_tbl() for any devctl event types - no need
to check the first byte of buffer. Remove these checks.

Also remove logging for the case of unknown devd message. It incorrectly
triggers when all devctl events are not fit into one buffer and part of
unread data will be read in the next pass.

When length of data readed from devctl is equal to sizeof(buf), then try
to read from socket again, to read full data.

MFC after: 2 weeks
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c