- chan.attr.read_timer_interval = (uint32_t) v;
- DBG("Channel read timer interval set to %d", chan.attr.read_timer_interval);
+ chan_opts.attr.read_timer_interval = (uint32_t) v;
+ DBG("Channel read timer interval set to %d", chan_opts.attr.read_timer_interval);
+ break;
+ }
+ case OPT_MONITOR_TIMER:
+ {
+ unsigned long v;
+
+ errno = 0;
+ opt_arg = poptGetOptArg(pc);
+ v = strtoul(opt_arg, NULL, 0);
+ if (errno != 0 || !isdigit(opt_arg[0])) {
+ ERR("Wrong value in --monitor-timer parameter: %s", opt_arg);
+ ret = CMD_ERROR;
+ goto end;
+ }
+ if (v != (uint32_t) v) {
+ ERR("32-bit overflow in --monitor-timer parameter: %s", opt_arg);
+ ret = CMD_ERROR;
+ goto end;
+ }
+ opt_monitor_timer.interval = (uint32_t) v;
+ opt_monitor_timer.set = true;
+ DBG("Channel monitor timer interval set to %d", opt_monitor_timer.interval);