提交 10647be5 authored 作者: Steve Underwood's avatar Steve Underwood

Fixed incorrect T.30 CTC messages. Fixed reseting of the CRC generator

in the HDLC tx code
上级 0685027b
......@@ -613,7 +613,10 @@ SPAN_DECLARE(int) hdlc_tx_restart(hdlc_tx_state_t *s)
s->report_flag_underflow = false;
s->len = 0;
s->pos = 0;
s->crc = 0;
if (s->crc_bytes == 2)
s->crc = 0xFFFF;
else
s->crc = 0xFFFFFFFF;
s->byte = 0;
s->bits = 0;
s->tx_end = false;
......
......@@ -3070,7 +3070,7 @@ static void process_rx_ppr(t30_state_t *s, const uint8_t *msg, int len)
int i;
int j;
int frame_no;
uint8_t frame[4];
uint8_t frame[5];
if (len != 3 + 256/8)
{
......@@ -3120,7 +3120,12 @@ static void process_rx_ppr(t30_state_t *s, const uint8_t *msg, int len)
s->ecm_progress = 0;
queue_phase(s, T30_PHASE_D_TX);
set_state(s, T30_STATE_IV_CTC);
send_simple_frame(s, T30_CTC);
frame[0] = ADDRESS_FIELD;
frame[1] = CONTROL_FIELD_FINAL_FRAME;
frame[2] = (uint8_t) (T30_CTC | s->dis_received);
frame[3] = 0;
frame[4] = fallback_sequence[s->current_fallback].dcs_code;
send_frame(s, frame, 5);
}
else
{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论