Remove unneccessary uri_in parameter from virMigratePrepareTunnel

Since virMigratePrepareTunnel() is used for migration over the
native libvirt connection, there is never any need to pass the
target URI to this method.

* daemon/remote.c, src/driver.h, src/libvirt.c, src/libvirt_internal.h,
  src/qemu/qemu_driver.c, src/remote/remote_driver.c,
  src/remote/remote_protocol.c, src/remote/remote_protocol.h,
  src/remote/remote_protocol.x: Remove 'uri_in' parameter from
  virMigratePrepareTunnel() method
This commit is contained in:
Daniel P. Berrange 2009-10-02 15:05:11 +01:00
parent dd26096ad1
commit f6c66d01fb
9 changed files with 9 additions and 26 deletions

View File

@ -1503,12 +1503,10 @@ remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_U
void *ret ATTRIBUTE_UNUSED)
{
int r;
char *uri_in;
char *dname;
struct qemud_client_stream *stream;
CHECK_CONN (client);
uri_in = args->uri_in == NULL ? NULL : *args->uri_in;
dname = args->dname == NULL ? NULL : *args->dname;
stream = remoteCreateClientStream(conn, hdr);
@ -1517,7 +1515,7 @@ remoteDispatchDomainMigratePrepareTunnel(struct qemud_server *server ATTRIBUTE_U
return -1;
}
r = virDomainMigratePrepareTunnel(conn, stream->st, uri_in,
r = virDomainMigratePrepareTunnel(conn, stream->st,
args->flags, dname, args->resource,
args->dom_xml);
if (r == -1) {

View File

@ -332,7 +332,6 @@ typedef int
(*virDrvDomainMigratePrepareTunnel)
(virConnectPtr conn,
virStreamPtr st,
const char *uri_in,
unsigned long flags,
const char *dname,
unsigned long resource,

View File

@ -3487,15 +3487,14 @@ error:
int
virDomainMigratePrepareTunnel(virConnectPtr conn,
virStreamPtr st,
const char *uri_in,
unsigned long flags,
const char *dname,
unsigned long bandwidth,
const char *dom_xml)
{
VIR_DEBUG("conn=%p, stream=%p, uri_in=%s, flags=%lu, dname=%s, "
"bandwidth=%lu, dom_xml=%s", conn, st, uri_in, flags,
VIR_DEBUG("conn=%p, stream=%p, flags=%lu, dname=%s, "
"bandwidth=%lu, dom_xml=%s", conn, st, flags,
NULLSTR(dname), bandwidth, dom_xml);
virResetLastError();
@ -3516,7 +3515,7 @@ virDomainMigratePrepareTunnel(virConnectPtr conn,
}
if (conn->driver->domainMigratePrepareTunnel) {
int rv = conn->driver->domainMigratePrepareTunnel(conn, st, uri_in,
int rv = conn->driver->domainMigratePrepareTunnel(conn, st,
flags, dname,
bandwidth, dom_xml);
if (rv < 0)

View File

@ -67,14 +67,14 @@ int virDomainMigratePrepare (virConnectPtr dconn,
char **uri_out,
unsigned long flags,
const char *dname,
unsigned long bandwidth);
unsigned long resource);
int virDomainMigratePerform (virDomainPtr domain,
const char *cookie,
int cookielen,
const char *uri,
unsigned long flags,
const char *dname,
unsigned long bandwidth);
unsigned long resource);
virDomainPtr virDomainMigrateFinish (virConnectPtr dconn,
const char *dname,
const char *cookie,
@ -88,7 +88,7 @@ int virDomainMigratePrepare2 (virConnectPtr dconn,
char **uri_out,
unsigned long flags,
const char *dname,
unsigned long bandwidth,
unsigned long resource,
const char *dom_xml);
virDomainPtr virDomainMigrateFinish2 (virConnectPtr dconn,
const char *dname,
@ -97,9 +97,8 @@ virDomainPtr virDomainMigrateFinish2 (virConnectPtr dconn,
const char *uri,
unsigned long flags,
int retcode);
int virDomainMigratePrepareTunnel(virConnectPtr conn,
int virDomainMigratePrepareTunnel(virConnectPtr dconn,
virStreamPtr st,
const char *uri_in,
unsigned long flags,
const char *dname,
unsigned long resource,

View File

@ -6078,7 +6078,6 @@ static virStreamDriver qemuStreamMigDrv = {
static int
qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
virStreamPtr st,
const char *uri_in,
unsigned long flags,
const char *dname,
unsigned long resource ATTRIBUTE_UNUSED,
@ -6101,11 +6100,6 @@ qemudDomainMigratePrepareTunnel(virConnectPtr dconn,
"%s", _("no domain XML passed"));
goto cleanup;
}
if (!uri_in) {
qemudReportError(dconn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s", _("no URI passed"));
goto cleanup;
}
if (!(flags & VIR_MIGRATE_TUNNELLED)) {
qemudReportError(dconn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s", _("PrepareTunnel called but no TUNNELLED flag set"));
@ -6462,7 +6456,7 @@ static int doTunnelMigrate(virDomainPtr dom,
goto close_stream;
}
internalret = dconn->driver->domainMigratePrepareTunnel(dconn, st, uri,
internalret = dconn->driver->domainMigratePrepareTunnel(dconn, st,
flags, dname,
resource, dom_xml);
VIR_FREE(dom_xml);

View File

@ -7053,7 +7053,6 @@ static virStreamDriver remoteStreamDrv = {
static int
remoteDomainMigratePrepareTunnel(virConnectPtr conn,
virStreamPtr st,
const char *uri_in,
unsigned long flags,
const char *dname,
unsigned long resource,
@ -7072,7 +7071,6 @@ remoteDomainMigratePrepareTunnel(virConnectPtr conn,
st->driver = &remoteStreamDrv;
st->privateData = privst;
args.uri_in = uri_in == NULL ? NULL : (char **) &uri_in;
args.flags = flags;
args.dname = dname == NULL ? NULL : (char **) &dname;
args.resource = resource;

View File

@ -2701,8 +2701,6 @@ bool_t
xdr_remote_domain_migrate_prepare_tunnel_args (XDR *xdrs, remote_domain_migrate_prepare_tunnel_args *objp)
{
if (!xdr_remote_string (xdrs, &objp->uri_in))
return FALSE;
if (!xdr_uint64_t (xdrs, &objp->flags))
return FALSE;
if (!xdr_remote_string (xdrs, &objp->dname))

View File

@ -1530,7 +1530,6 @@ struct remote_secret_lookup_by_usage_ret {
typedef struct remote_secret_lookup_by_usage_ret remote_secret_lookup_by_usage_ret;
struct remote_domain_migrate_prepare_tunnel_args {
remote_string uri_in;
uint64_t flags;
remote_string dname;
uint64_t resource;

View File

@ -1356,7 +1356,6 @@ struct remote_secret_lookup_by_usage_ret {
};
struct remote_domain_migrate_prepare_tunnel_args {
remote_string uri_in;
unsigned hyper flags;
remote_string dname;
unsigned hyper resource;