]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
gendispatch: add DomainRestoreParams as requiring conn argument
authorClaudio Fontana <cfontana@suse.de>
Fri, 6 May 2022 13:10:54 +0000 (15:10 +0200)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 May 2022 14:34:30 +0000 (15:34 +0100)
in preparation for the addition of DomainRestoreParams,
add it to the list of methods requiring a conn first argument.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/rpc/gendispatch.pl

index 9f5bf0e3165986f32bc3dd635c8155f0fc3237e8..a64ff3e73f770da5e251b5417fae632201f9c905 100755 (executable)
@@ -637,7 +637,10 @@ elsif ($mode eq "server") {
                 } elsif ($args_member =~ m/^remote_typed_param (\S+)<(\S+)>;/) {
                     push(@vars_list, "virTypedParameterPtr $1 = NULL");
                     push(@vars_list, "int n$1 = 0");
-                    if ($call->{ProcName} eq "NodeSetMemoryParameters") {
+
+                    # NB: if your new API starts with remote_typed_params, enter it here if you need
+                    # the conn arg to be passed first!
+                    if ($call->{ProcName} eq "NodeSetMemoryParameters" || $call->{ProcName} eq "DomainRestoreParams") {
                         push(@args_list, $conn_var);
                     }
                     push(@args_list, "$1");