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 (sessionState == null) {
|
||||
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 {
|
||||
state = ctbrec.sites.mfc.State.OFFLINE;
|
||||
|
@ -91,8 +93,7 @@ public class MyFreeCamsModel extends AbstractModel {
|
|||
}
|
||||
|
||||
switch(state) {
|
||||
case ONLINE:
|
||||
case RECORDING:
|
||||
case ONLINE, RECORDING:
|
||||
return ctbrec.Model.State.ONLINE;
|
||||
case AWAY:
|
||||
return ctbrec.Model.State.AWAY;
|
||||
|
@ -100,9 +101,7 @@ public class MyFreeCamsModel extends AbstractModel {
|
|||
return ctbrec.Model.State.PRIVATE;
|
||||
case GROUP_SHOW:
|
||||
return ctbrec.Model.State.GROUP;
|
||||
case OFFLINE:
|
||||
case CAMOFF:
|
||||
case UNKNOWN:
|
||||
case OFFLINE, CAMOFF, UNKNOWN:
|
||||
return ctbrec.Model.State.OFFLINE;
|
||||
default:
|
||||
LOG.debug("State {} is not mapped", this.state);
|
||||
|
|
Loading…
Reference in New Issue