On Mon, Sep 22, 2014 at 18:34:47 +0200, Jano Tomko wrote: > On 09/17/2014 04:53 PM, Jiri Denemark wrote: > > For compatibility with old libvirt we need to support both tcp:host and > > tcp://host migration URIs. Let's make the code that parses them a bit > > cleaner. > > > > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> > > --- > > > > Notes: > > Version 3: > > - new patch to make "qemu: RDMA migration support" a bit more > > straightforward > > > > src/qemu/qemu_migration.c | 77 ++++++++++++++++++++--------------------------- > > 1 file changed, 33 insertions(+), 44 deletions(-) > > > > > @@ -2931,27 +2935,22 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver, > > if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0) > > goto cleanup; > > > > + /* Send well-formed URI only if uri_in was well-formed */ > > if (well_formed_uri) { > > uri->port = port; > > - > > - /* Caller frees */ > > if (!(*uri_out = virURIFormat(uri))) > > goto cleanup; > > } else { > > - /* Caller frees */ > > if (virAsprintf(uri_out, "%s:%d", uri_in, port) < 0) > > goto cleanup; > > } > > - > > } else { > > port = uri->port; > > autoPort = false; > > } > > } > > > > > > - if (*uri_out) > > - VIR_DEBUG("Generated uri_out=%s", *uri_out); > > - > > + VIR_DEBUG("Generated uri_out=%s", *uri_out); > > If uri_in contains a port, uri_out will not be generated. Oh right, I knew I was missing something :-) Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list