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é <[email protected]>
> ---
> 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 <[email protected]>
John
>
> print " virReportError(VIR_ERR_INTERNAL_ERROR, \"%s\",
> _(\"connection not open\"));\n";
> @@ -1034,7 +1030,7 @@ elsif ($mode eq "server") {
> }
>
[...]
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list