[PATCH] io: Stop appending -listen to net listeners

Fabiano Rosas posted 1 patch 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230904144108.3825-1-farosas@suse.de
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>
io/net-listener.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[PATCH] io: Stop appending -listen to net listeners
Posted by Fabiano Rosas 1 year, 2 months ago
All callers of qio_net_listener_set_name() already add some sort of
"listen" or "listener" suffix.

For intance, we currently have "migration-socket-listener-listen" and
"vnc-listen-listen" as ioc names.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 io/net-listener.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/io/net-listener.c b/io/net-listener.c
index 1c984d69c6..47405965a6 100644
--- a/io/net-listener.c
+++ b/io/net-listener.c
@@ -109,9 +109,7 @@ void qio_net_listener_add(QIONetListener *listener,
                           QIOChannelSocket *sioc)
 {
     if (listener->name) {
-        char *name = g_strdup_printf("%s-listen", listener->name);
-        qio_channel_set_name(QIO_CHANNEL(sioc), name);
-        g_free(name);
+        qio_channel_set_name(QIO_CHANNEL(sioc), listener->name);
     }
 
     listener->sioc = g_renew(QIOChannelSocket *, listener->sioc,
-- 
2.35.3
Re: [PATCH] io: Stop appending -listen to net listeners
Posted by Daniel P. Berrangé 1 year, 2 months ago
On Mon, Sep 04, 2023 at 11:41:08AM -0300, Fabiano Rosas wrote:
> All callers of qio_net_listener_set_name() already add some sort of
> "listen" or "listener" suffix.
> 
> For intance, we currently have "migration-socket-listener-listen" and
> "vnc-listen-listen" as ioc names.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>  io/net-listener.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

and queued.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|