提交 1059f1bb 编写于 作者: A Ashijeet Acharya 提交者: Kevin Wolf

block/ssh: Use InetSocketAddress options

Drop the use of legacy options in favour of the InetSocketAddress
options.
Signed-off-by: NAshijeet Acharya <ashijeetacharya@gmail.com>
Reviewed-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 0da5b8ef
......@@ -197,6 +197,7 @@ static int parse_uri(const char *filename, QDict *options, Error **errp)
{
URI *uri = NULL;
QueryParams *qp;
char *port_str;
int i;
uri = uri_parse(filename);
......@@ -229,11 +230,11 @@ static int parse_uri(const char *filename, QDict *options, Error **errp)
qdict_put(options, "user", qstring_from_str(uri->user));
}
qdict_put(options, "host", qstring_from_str(uri->server));
qdict_put(options, "server.host", qstring_from_str(uri->server));
if (uri->port) {
qdict_put(options, "port", qint_from_int(uri->port));
}
port_str = g_strdup_printf("%d", uri->port ?: 22);
qdict_put(options, "server.port", qstring_from_str(port_str));
g_free(port_str);
qdict_put(options, "path", qstring_from_str(uri->path));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册