char-socket: tcp_chr_recv(): add comment
Add comment, to stress that the order of operation (first drop old fds, second check read status) is intended. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6e9a6d57bf
commit
9adc8d052d
1 changed files with 6 additions and 1 deletions
|
|
@ -294,7 +294,12 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len)
|
|||
}
|
||||
|
||||
if (msgfds_num) {
|
||||
/* close and clean read_msgfds */
|
||||
/*
|
||||
* Close and clean previous read_msgfds, they are obsolete at
|
||||
* this point, regardless result of new call to
|
||||
* qio_channel_readv_full().
|
||||
*/
|
||||
|
||||
for (i = 0; i < s->read_msgfds_num; i++) {
|
||||
close(s->read_msgfds[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue