xenapi: Don't overwrite virAuthGet{Username|Password} errors
Now that the virAuthGet*Path API's generate all the error messages we can remove them from the callers. This means that we will no longer overwrite the error from the API. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
parent
62b04f698c
commit
e456575e6f
@ -156,22 +156,14 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
if (VIR_STRDUP(username, conn->uri->user) < 0)
|
if (VIR_STRDUP(username, conn->uri->user) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
username = virAuthGetUsername(conn, auth, "xen", NULL, conn->uri->server);
|
if (!(username = virAuthGetUsername(conn, auth, "xen", NULL,
|
||||||
|
conn->uri->server)))
|
||||||
if (username == NULL) {
|
|
||||||
xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
|
|
||||||
_("Username request failed"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
password = virAuthGetPassword(conn, auth, "xen", username, conn->uri->server);
|
if (!(password = virAuthGetPassword(conn, auth, "xen", username,
|
||||||
|
conn->uri->server)))
|
||||||
if (password == NULL) {
|
|
||||||
xenapiSessionErrorHandler(conn, VIR_ERR_AUTH_FAILED,
|
|
||||||
_("Password request failed"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
if (VIR_ALLOC(privP) < 0)
|
if (VIR_ALLOC(privP) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user