]> git.ipfire.org Git - thirdparty/lldpd.git/commit
lib: fix sync_recv to handle segmentation
authorVincent Bernat <bernat@luffy.cx>
Sat, 30 Mar 2013 14:42:51 +0000 (15:42 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 30 Mar 2013 14:42:51 +0000 (15:42 +0100)
commite581ec3043d528cadb56c5d49b1b29c92fa78d83
tree37a712a3aaf524dfe0263b6b6ab7702959eb002a
parent3bd96fcb13a5370086a6eddc03104e21a5f085be
lib: fix sync_recv to handle segmentation

While it should not happen with Unix sockets, a read() can return only
partial data. Therefore, we continue to poll until we get the
appropriate length.

This fix was proposed by Chris Yang. Closes #31.
src/lib/connection.c