Finished muted devices capability.

This commit is contained in:
Rob Giseburt
2016-12-13 17:09:31 -06:00
parent 7a3899f141
commit 1380b2f21b
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -200,7 +200,7 @@ static stat_t _dispatch_control()
static stat_t _dispatch_command()
{
if (cs.controller_state != CONTROLLER_PAUSED) {
devflags_t flags = DEV_IS_BOTH;
devflags_t flags = DEV_IS_BOTH | DEV_IS_MUTED; // expressly state we'll handle muted devices
if ((!mp_planner_is_full()) && (cs.bufp = xio_readline(flags, cs.linelen)) != NULL) {
_dispatch_kernel(flags);
}
@@ -217,6 +217,9 @@ static void _dispatch_kernel(const devflags_t flags)
nv_reset_nv_list(); // get a fresh nvObj list
nv_add_string((const char *)"msg", "lines from muted devices are ignored");
nv_print_list(status, TEXT_NO_PRINT, JSON_RESPONSE_TO_MUTED_FORMAT);
// It's possible to let some stuff through, but that's not happening yet.
return;
}
while ((*cs.bufp == SPC) || (*cs.bufp == TAB)) { // position past any leading whitespace
+2 -2
View File
@@ -363,8 +363,8 @@ struct xio_t {
// We only do this second pass if this is not a CTRL-only read
if (!checkForCtrlOnly(limit_flags)) {
for (uint8_t dev=0; dev < _dev_count; dev++) {
// if (!DeviceWrappers[dev]->isActive())
// continue;
if (!DeviceWrappers[dev]->isActive())
continue;
ret_buffer = DeviceWrappers[dev]->readline(limit_flags, size);