[Spice-devel] [PATCH v2 x11spice 4/4] Bug fix: a listen specification from the config file was ignored
Jeremy White
jwhite at codeweavers.com
Thu Jul 18 21:14:05 UTC 2019
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
src/options.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/options.c b/src/options.c
index 5a55f2c9..a3dd20ac 100644
--- a/src/options.c
+++ b/src/options.c
@@ -339,7 +339,9 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
if (rc == 0) {
if (optind >= argc) {
/* Default */
- options->listen = g_strdup("5900");
+ if (options->listen == NULL) {
+ options->listen = g_strdup("5900");
+ }
} else if (optind < (argc - 1)) {
fprintf(stderr, "Error: too many arguments\n");
rc = X11SPICE_ERR_BADARGS;
--
2.11.0
More information about the Spice-devel
mailing list