[libvirt] [PATCH 34/41] remote: change generated methods to not directly access connection
Andrea Bolognani
abologna at redhat.com
Sun Jul 28 17:50:28 UTC 2019
On Tue, 2019-07-23 at 17:03 +0100, Daniel P. Berrangé wrote:
> +++ b/src/remote/remote_daemon_dispatch.c
> @@ -2013,6 +2134,7 @@ remoteDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED,
> }
>
>
> +
> static int
> remoteDispatchDomainGetSchedulerType(virNetServerPtr server ATTRIBUTE_UNUSED,
> virNetServerClientPtr client,
Unrelated whitespace change.
[...]
> +++ b/src/rpc/gendispatch.pl
> @@ -581,11 +599,11 @@ elsif ($mode eq "server") {
> " virObjectUnref(snapshot);\n" .
> " virObjectUnref(dom);");
> } elsif ($args_member =~ m/^(?:(?:admin|remote)_string|remote_uuid) (\S+)<\S+>;/) {
> - push(@args_list, $conn) if !@args_list;
> + push(@args_list, "$conn_var") if !@args_list;
I don't speak Perl, so asking mostly out of curiosity: why is the
argument quoted now? Especially since...
> @@ -1095,7 +1105,7 @@ elsif ($mode eq "server") {
> } elsif (!$multi_ret) {
> my $proc_name = $call->{ProcName};
>
> - push(@args_list, $conn) if !@args_list;
> + push(@args_list, $conn_var) if !@args_list;
... this code looks like it's performing the same operation, yet the
argument is not quoted here, which leads me to believe one of the two
is not correct.
Anyway, from a high-level perspective the changes in the script seem
reasonable enough and so do the changes they produce in the generated
files, so
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list