Use online state in isOnline if it is available
This commit is contained in:
parent
f9d777b039
commit
fafd9268e7
|
@ -65,6 +65,8 @@ public class MyFreeCamsModel extends AbstractModel {
|
||||||
if (online) {
|
if (online) {
|
||||||
if (sessionState == null) {
|
if (sessionState == null) {
|
||||||
LOG.warn("MFC model {} [{}] seems to be online but a SessionState could not be found", getName(), getUid());
|
LOG.warn("MFC model {} [{}] seems to be online but a SessionState could not be found", getName(), getUid());
|
||||||
|
} else {
|
||||||
|
return state == ctbrec.sites.mfc.State.ONLINE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
state = ctbrec.sites.mfc.State.OFFLINE;
|
state = ctbrec.sites.mfc.State.OFFLINE;
|
||||||
|
@ -91,8 +93,7 @@ public class MyFreeCamsModel extends AbstractModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case ONLINE:
|
case ONLINE, RECORDING:
|
||||||
case RECORDING:
|
|
||||||
return ctbrec.Model.State.ONLINE;
|
return ctbrec.Model.State.ONLINE;
|
||||||
case AWAY:
|
case AWAY:
|
||||||
return ctbrec.Model.State.AWAY;
|
return ctbrec.Model.State.AWAY;
|
||||||
|
@ -100,9 +101,7 @@ public class MyFreeCamsModel extends AbstractModel {
|
||||||
return ctbrec.Model.State.PRIVATE;
|
return ctbrec.Model.State.PRIVATE;
|
||||||
case GROUP_SHOW:
|
case GROUP_SHOW:
|
||||||
return ctbrec.Model.State.GROUP;
|
return ctbrec.Model.State.GROUP;
|
||||||
case OFFLINE:
|
case OFFLINE, CAMOFF, UNKNOWN:
|
||||||
case CAMOFF:
|
|
||||||
case UNKNOWN:
|
|
||||||
return ctbrec.Model.State.OFFLINE;
|
return ctbrec.Model.State.OFFLINE;
|
||||||
default:
|
default:
|
||||||
LOG.debug("State {} is not mapped", this.state);
|
LOG.debug("State {} is not mapped", this.state);
|
||||||
|
|
Loading…
Reference in New Issue