Skip to content

Commit

Permalink
Merge pull request #44 from atoy40/async-refactor-update
Browse files Browse the repository at this point in the history
Bug fixed
  • Loading branch information
atoy40 committed Apr 16, 2015
2 parents 732ebd8 + d1e5437 commit 37cbe6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ Promise.promisifyAll(libvirt.StorageVolume.prototype);
libvirt.Hypervisor.prototype.getAllDomains = function() {
var defined;

return this.listDefinedDomainsAsync()
return this.listDefinedDomainsAsync().bind(this)
.map(function(name) {
return this.lookupDomainByNameAsync(name);
}.bind(this))
})
.then(function(domains) {
defined = domains;
return this.listActiveDomainsAsync();
}.bind(this))
})
.map(function(id) {
return this.lookupDomainByIdAsync(id);
}.bind(this))
})
.then(function(domains) {
return domains.concat(defined);
})
});
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion src/domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ NLV_WORKER_EXECUTE(Domain, GetInterfaceStats)
{
NLV_WORKER_ASSERT_DOMAIN();
int result =
virDomainInterfaceStats(Handle().ToDomain(), interface_.c_str(), &stats_, sizeof(&stats_));
virDomainInterfaceStats(Handle().ToDomain(), interface_.c_str(), &stats_, sizeof(stats_));
if (result == -1) {
SetVirError(virGetLastError());
return;
Expand Down

0 comments on commit 37cbe6c

Please sign in to comment.