When phc2sys is started before ptp4l or it is interrupted before ptp4l has a chance to reply to its query, the "uds: sendto failed: Connection refused" message is output. This is not an interesting message.
Also, don't output the "failed to send message" error from pmc_send, as all transports output errors in their send routine. Signed-off-by: Jiri Benc <jb...@redhat.com> --- pmc_common.c | 10 +++------- uds.c | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pmc_common.c b/pmc_common.c index a7201f92454d..2c75074c8fb7 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -143,18 +143,14 @@ static struct ptp_message *pmc_message(struct pmc *pmc, uint8_t action) static int pmc_send(struct pmc *pmc, struct ptp_message *msg, int pdulen) { - int cnt, err; + int err; + err = msg_pre_send(msg); if (err) { pr_err("msg_pre_send failed"); return -1; } - cnt = transport_send(pmc->transport, &pmc->fdarray, 0, msg); - if (cnt < 0) { - pr_err("failed to send message"); - return -1; - } - return 0; + return transport_send(pmc->transport, &pmc->fdarray, 0, msg); } static int pmc_tlv_datalen(struct pmc *pmc, int id) diff --git a/uds.c b/uds.c index e88b333e4f00..e98e32c0351d 100644 --- a/uds.c +++ b/uds.c @@ -111,7 +111,7 @@ static int uds_send(struct transport *t, struct fdarray *fda, int event, addr = &uds->address; cnt = sendto(fd, buf, buflen, 0, &addr->sa, addr->len); - if (cnt <= 0) { + if (cnt <= 0 && errno != ECONNREFUSED) { pr_err("uds: sendto failed: %m"); } return cnt; -- 1.7.6.5 ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel