Commit 1c2b0811 authored by Alessandro Rubini's avatar Alessandro Rubini

send_and_log: treat drop events as success

Dropping on tx is normal behaviour under test. state-listening is
still entering faulty (thus waiting 4 seconds before restarting) if tx
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 3a3ef679
......@@ -297,9 +297,13 @@ int st_com_master_handle_sync(struct pp_instance *ppi, unsigned char *buf,
int __send_and_log(struct pp_instance *ppi, int msglen, int chtype)
int msgtype = ((char *)ppi->tx_ptp)[0] & 0xf;
int ret;
if (ppi->n_ops->send(ppi, ppi->tx_frame, msglen + ppi->tx_offset,
msgtype) < msglen) {
ret = ppi->n_ops->send(ppi, ppi->tx_frame, msglen + ppi->tx_offset,
if (ret == PP_SEND_DROP)
return 0; /* don't report as error, nor count nor log as sent */
if (ret < msglen) {
pp_diag(ppi, frames, 1, "%s(%d) Message can't be sent\n",
pp_msgtype_info[msgtype].name, msgtype);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment