Commit 28fe78eb authored by Alessandro Rubini's avatar Alessandro Rubini

trivial: fix a message about ignored frames

If we warn about an ignored frame we'd better tell which one.
Also, if it's the hook->servo that ate it, do not warn.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 922e2caf
......@@ -87,8 +87,9 @@ int pp_master(struct pp_instance *ppi, uint8_t *pkt, int plen)
&& actions[msgtype]) {
e = actions[msgtype](ppi, pkt, plen);
} else {
if (plen)
pp_diag(ppi, frames, 1, "Ignored frame\n");
if (plen && msgtype != PPM_NO_MESSAGE)
pp_diag(ppi, frames, 1, "Ignored frame %i\n",
msgtype);
}
out:
......
......@@ -98,7 +98,8 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
e = actions[hdr->messageType](ppi, pkt, plen);
} else {
if (plen)
pp_diag(ppi, frames, 1, "Ignored frame\n");
pp_diag(ppi, frames, 1, "Ignored frame %i\n",
hdr->messageType);
}
if (e)
goto out;
......
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