<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">As a general rule the public virDomainPtr objects should not be passed<br>

down into internal methods. Likewise, when creating / defining a VM,<br>
the virGetDomain call should be the last one in the normal execution<br>
path of the method.<br>
<br>
Thus, just pass the 'virConnectPtr' instance to openvzDomainSetVcpusInternal<br>
as suggested above, and keep the setVcpusInternal calls above the call<br>
to virGetDomain.<br></blockquote></div>OK, done.<br>