Fix HDLC-FCS transmit side
If we are not able to read more packets from the user application, the recv/read call will return 0 and set errno = EAGAIN. In this situation we cannot bail out but still ask the HDLC code to generate output (sequences of flag octets). If we fail to do that, we will transmit all-ones pattern instaed of all-flag octets. Change-Id: Id3bc76f1956138dcd9cb7b499f7251cd94af1329
This commit is contained in:
parent
73f248fd74
commit
1b75abe5ce
|
@ -194,7 +194,7 @@ _e1_tx_hdlcfs(struct e1_ts *ts, uint8_t *buf, int len)
|
|||
rv, osmo_hexdump(ts->tx_buf, rv));
|
||||
ts->tx_len = rv;
|
||||
ts->tx_ofs = 0;
|
||||
} else if (rv < 0)
|
||||
} else if (rv < 0 && errno != EAGAIN)
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue