(i.e. we look for >=10 errors in 1000 bits). We make an assessment every 100 bits, using a sliding
window over the last 1000 bits. We assess the 1 in 1000 rate over 10000 bits in a similar way, and
so on for the lower error rates. */
- test = false;
+ test = true;
for (i = 2; i <= 7; i++)
{
if (++s->decade_ptr[i] < 10)
break;
case T30_MODEM_DONE:
span_log(&s->logging, SPAN_LOG_FLOW, "FAX exchange complete\n");
+ /* Fall through */
default:
fax_modems_set_rx_handler(t, (span_rx_handler_t) &span_dummy_rx, s, (span_rx_fillin_handler_t) &span_dummy_rx_fillin, s);
break;
return (uint8_t) (0x7F ^ mask);
}
/* We must be just a tiny step below zero */
- return (uint8_t) (0x00 ^ mask);
+ return (uint8_t) mask;
}
/* Combine the sign, segment, and quantization bits. */
return (uint8_t) (((seg << 4) | ((linear >> ((seg) ? (seg + 3) : 4)) & 0x0F)) ^ mask);
span_log(&s->logging, SPAN_LOG_FLOW, "Sending user supplied NSF - %d octets\n", s->tx_info.nsf_len);
s->tx_info.nsf[0] = ADDRESS_FIELD;
s->tx_info.nsf[1] = CONTROL_FIELD_NON_FINAL_FRAME;
- s->tx_info.nsf[2] = (uint8_t) (T30_NSF | s->dis_received);
+ s->tx_info.nsf[2] = T30_NSF;
send_frame(s, s->tx_info.nsf, s->tx_info.nsf_len + 3);
return true;
}
span_log(&s->logging, SPAN_LOG_FLOW, "Sending user supplied NSC - %d octets\n", s->tx_info.nsc_len);
s->tx_info.nsc[0] = ADDRESS_FIELD;
s->tx_info.nsc[1] = CONTROL_FIELD_NON_FINAL_FRAME;
- s->tx_info.nsc[2] = (uint8_t) (T30_NSC | s->dis_received);
+ s->tx_info.nsc[2] = T30_NSC;
send_frame(s, s->tx_info.nsc, s->tx_info.nsc_len + 3);
return true;
}