]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
char-socket: tcp_chr_recv(): add comment
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tue, 16 Sep 2025 13:13:51 +0000 (16:13 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 19 Sep 2025 11:46:07 +0000 (12:46 +0100)
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>
chardev/char-socket.c

index b1ce5d01c7b7a870e2a892f43aa4a95b0d1b0eb3..1be078dfc023f1dbbf8400733357a87bf0ece7ac 100644 (file)
@@ -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]);
         }