mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 19:16:59 +00:00
Fixed incorrect T.30 CTC messages. Fixed reseting of the CRC generator
in the HDLC tx code
This commit is contained in:
parent
0685027bd8
commit
10647be5a0
@ -613,7 +613,10 @@ SPAN_DECLARE(int) hdlc_tx_restart(hdlc_tx_state_t *s)
|
|||||||
s->report_flag_underflow = false;
|
s->report_flag_underflow = false;
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
s->pos = 0;
|
s->pos = 0;
|
||||||
s->crc = 0;
|
if (s->crc_bytes == 2)
|
||||||
|
s->crc = 0xFFFF;
|
||||||
|
else
|
||||||
|
s->crc = 0xFFFFFFFF;
|
||||||
s->byte = 0;
|
s->byte = 0;
|
||||||
s->bits = 0;
|
s->bits = 0;
|
||||||
s->tx_end = false;
|
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 i;
|
||||||
int j;
|
int j;
|
||||||
int frame_no;
|
int frame_no;
|
||||||
uint8_t frame[4];
|
uint8_t frame[5];
|
||||||
|
|
||||||
if (len != 3 + 256/8)
|
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;
|
s->ecm_progress = 0;
|
||||||
queue_phase(s, T30_PHASE_D_TX);
|
queue_phase(s, T30_PHASE_D_TX);
|
||||||
set_state(s, T30_STATE_IV_CTC);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user