Fixed some minor bugs (problems with autostart, duplicate machine IDs, etc)
This commit is contained in:
parent
b60e988aba
commit
3069d317c6
164 changed files with 7277 additions and 934 deletions
|
|
@ -668,6 +668,7 @@ Computer.prototype.donePowerOn = function(aParms)
|
|||
* TODO: Do we not care about the return value here? (ie, is checking fRestoreError sufficient)?
|
||||
*/
|
||||
this.powerRestore(this.cpu, stateComputer, fRepower, fRestore);
|
||||
this.cpu.autoStart();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -685,6 +686,34 @@ Computer.prototype.donePowerOn = function(aParms)
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* checkPower()
|
||||
*
|
||||
* @this {Computer}
|
||||
* @return {boolean} true if the computer is fully powered, false otherwise
|
||||
*/
|
||||
Computer.prototype.checkPower = function()
|
||||
{
|
||||
if (this.aFlags.fPowered) return true;
|
||||
|
||||
var component = null, iComponent;
|
||||
var aComponents = Component.getComponents(this.id);
|
||||
for (iComponent = 0; iComponent < aComponents.length; iComponent++) {
|
||||
component = aComponents[iComponent];
|
||||
if (component !== this && !component.aFlags.fReady) break;
|
||||
}
|
||||
if (iComponent == aComponents.length) {
|
||||
for (iComponent = 0; iComponent < aComponents.length; iComponent++) {
|
||||
component = aComponents[iComponent];
|
||||
if (component !== this && !component.aFlags.fPowered) break;
|
||||
}
|
||||
}
|
||||
if (iComponent == aComponents.length) component = this;
|
||||
var s = "The " + component.type + " component (" + component.id + ") is not " + (!component.aFlags.fReady? "ready yet" + (component.fnReady? " (waiting for notification)" : "") : "powered yet") + ".";
|
||||
web.alertUser(s);
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* powerReport(stateComputer)
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue