2010/1/17 Daniel P. Berrange <berrange@xxxxxxxxxx>: > On Sat, Jan 16, 2010 at 03:22:01PM +0100, Matthias Bolte wrote: >> Before the driver assumed that there is always a domain part. That's >> not true. Now the domain part is handled as optional. >> --- >> src/esx/esx_driver.c | 17 ++++++++++------- >> 1 files changed, 10 insertions(+), 7 deletions(-) >> >> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c >> index 4ed4533..aeb3d07 100644 >> --- a/src/esx/esx_driver.c >> +++ b/src/esx/esx_driver.c >> @@ -773,14 +773,17 @@ esxGetHostname(virConnectPtr conn) >> } >> >> if (domainName == NULL || strlen(domainName) < 1) { >> - ESX_ERROR(VIR_ERR_INTERNAL_ERROR, >> - "Missing or empty 'domainName' property"); >> - goto failure; >> - } >> + complete = strdup(hostName); >> >> - if (virAsprintf(&complete, "%s.%s", hostName, domainName) < 0) { >> - virReportOOMError(NULL); >> - goto failure; >> + if (complete == NULL) { >> + virReportOOMError(NULL); >> + goto failure; >> + } >> + } else { >> + if (virAsprintf(&complete, "%s.%s", hostName, domainName) < 0) { >> + virReportOOMError(NULL); >> + goto failure; >> + } >> } >> >> cleanup: >> -- > > ACK > > > Daniel > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list