Re: [PATCH 1/7] rpc: refactor way connection object is generated for remote dispatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 03/28/2018 11:18 AM, Daniel P. Berrangé wrote:
> Calling a push_privconn method to directly push the connection object
> name into the arg list is inconvenient. Refactor so that we acquire
> the connection variable name upfront, and push it to the arg list
> separately. This allows various hardcoded usage of "priv->conn" to
> be parameterized.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/rpc/gendispatch.pl | 48 ++++++++++++++++++++++--------------------------
>  1 file changed, 22 insertions(+), 26 deletions(-)
> 
> diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
> index fb15cc4849..e11921f3d9 100755
> --- a/src/rpc/gendispatch.pl
> +++ b/src/rpc/gendispatch.pl

[...]

> @@ -1002,7 +998,7 @@ elsif ($mode eq "server") {
>          if ($structprefix eq "admin") {
>              print "    if (!priv->dmn) {\n";
>          } else {
> -            print "    if (!priv->conn) {\n";
> +            print "    if (!$conn) {\n";
>          }

Shouldn't this just be "if (!$conn) {\n" for both halves of the if else?

w/ slight adjustment,

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

>  
>          print "        virReportError(VIR_ERR_INTERNAL_ERROR, \"%s\", _(\"connection not open\"));\n";
> @@ -1034,7 +1030,7 @@ elsif ($mode eq "server") {
>          }
>  
[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux