Patchwork [v2,07/13] qemu-char: fix documentation for telnet+wait socket flags

login
register
mail settings
Submitter Gerd Hoffmann
Date June 24, 2013, 6:39 a.m.
Message ID <1372055996-4072-8-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/253637/
State New
Headers show

Comments

Gerd Hoffmann - June 24, 2013, 6:39 a.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qapi-schema.json |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Markus Armbruster - June 24, 2013, 8:08 a.m.
Gerd Hoffmann <kraxel@redhat.com> writes:

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  qapi-schema.json |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index a80ee40..a29ce57 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3185,10 +3185,11 @@
>  # @addr: socket address to listen on (server=true)
>  #        or connect to (server=false)
>  # @server: #optional create server socket (default: true)
> -# @wait: #optional wait for connect (not used for server
> -#        sockets, default: false)
> +# @wait: #optional wait for incoming connection on server
> +#        sockets (default: false).
>  # @nodelay: #optional set TCP_NODELAY socket option (default: false)
> -# @telnet: #optional enable telnet protocol (default: false)
> +# @telnet: #optional enable telnet protocol on server
> +#          sockets (default: false)
>  #
>  # Since: 1.4
>  ##

Yes, both options apply only with server=true (I double-checked).

Curiously, qemu_chr_open_socket_fd() puts "telnet" into chr->filename
regardless of server.

qemu_chr_open_socket() has

    if (!is_listen)
        is_waitconnect = 0;

Should this perhaps be

    if (!is_listen) {
        is_waitconnect = 0;
        is_telnet = 0;
    }

?

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index a80ee40..a29ce57 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3185,10 +3185,11 @@ 
 # @addr: socket address to listen on (server=true)
 #        or connect to (server=false)
 # @server: #optional create server socket (default: true)
-# @wait: #optional wait for connect (not used for server
-#        sockets, default: false)
+# @wait: #optional wait for incoming connection on server
+#        sockets (default: false).
 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
-# @telnet: #optional enable telnet protocol (default: false)
+# @telnet: #optional enable telnet protocol on server
+#          sockets (default: false)
 #
 # Since: 1.4
 ##