History | View | Annotate | Download (26.3 kB)
qemu-socket: don't leak opts on error
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qemu-socket: zero-initialize SocketAddress
qemu-socket: drop pointless allocation
qemu-socket: catch monitor_get_fd failures
qemu-socket: allow hostnames starting with a digit
According to RFC 1123 [1], hostnames can start with a digit too.
[1] http://tools.ietf.org/html/rfc1123#page-13
Signed-off-by: Ján Tomko <jtomko@redhat.com>Cc: qemu-stable@nongnu.org[Use strspn, not strcspn. - Paolo]...
util: move socket_init() to osdep.c
vscclient needs to call socket_init() for portability.Moving to osdep.c since it has no internal dependency.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>
oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.Rename to qemu_set_nonblock() just like qemu_set_cloexec().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qemu-socket: set passed fd non-blocking in socket_connect()
socket_connect() sets non-blocking on TCP or UNIX domain sockets if acallback function is passed. Do the same for file descriptor passing,otherwise we could unexpectedly be using a blocking file descriptor....
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qemu-socket: Make socket_optslist public
Allow other users to create the QemuOpts needed for inet_connect_opts().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
nbd: Keep hostname and port separate
The NBD block supports an URL syntax, for which a URL parser returnsseparate hostname and port fields. It also supports the traditional qemusyntax encoded in a filename. Until now, after parsing the URL to geteach piece of information, a new string is built to be fed to socket...
MinGW: Replace setsockopt by qemu_setsocketopt
Instead of adding missing type casts which are needed by MinGW for the4th argument, the patch uses qemu_setsockopt which was invented for thispurpose.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
chardev: add udp support to qapi
This patch adds 'udp' support to qapi.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
char-socket: fix error reporting
Right now the inet connect code tries all available addresses but until onedoesn't fail. It passes local_err each time without clearing it from theprevious failure. This can trigger an assert since the inet connect code...
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep comingback. Tracked down with this Coccinelle semantic patch:
r expression err, eno, cls, fmt; position p; @@ (...
r
build: move libqemuutil.a components to util/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>