
On 10/03/2011 02:23 PM, Sharad Mishra wrote:
Re: [Libvirt-cim] [PATCH] VirtualSystemManagementService: Avoid extra connection to libvirt
Actually, this change only prevents a 'nested' connection. There are still 2 connects; one in update_dominfo() and one in _resource_dynamic().
There should not be 2 connects here. One connection will be created in update_dominfo which will be closed on exiting that function and a new one created later in _resource_dynamic().
Also, moving the call to update_dominfo() up negates the check done by the code block that begins with 'dom = virDomainLookupByName(conn, dominfo->name);'
There is a similar check in update_dominfo too.
In my opinion this patch makes sense.
-Sharad Mishra
Yes, that was the rationale of the patch. In fact, the update_dominfo function does not make any use of the values in _resource_dynamic. Best regards, Etrunko -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima@br.ibm.com