I, of course, meant to write nmea source and not master. On Sat, May 15, 2021 at 11:14 PM Lars Munch <l...@segv.dk> wrote: > > On second thought I am not sure this should be a pr_info. Losing connection > to the master is not good even if it shuts down properly. Not being able to > connect to the master is also a pr_err and getting disconnected is in the same > ballpark. > > On Fri, May 14, 2021 at 6:29 PM Geva, Erez <erez.geva....@siemens.com> wrote: > > > > Yes. > > > > -----Original Message----- > > From: Lars Munch <l...@segv.dk> > > Sent: Friday, 14 May 2021 18:20 > > To: Geva, Erez (ext) (DI PA DCP R&D 3) <erez.geva....@siemens.com> > > Cc: linuxptp-devel@lists.sourceforge.net > > Subject: Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer > > shutdown > > > > On Fri, May 14, 2021 at 4:24 PM Geva, Erez <erez.geva....@siemens.com> > > wrote: > > > > > > Make sense to handle 0, end of file. > > > But as it is NOT an error, perhaps it should use a proper pr_info(). > > > > So something like this? > > > > cnt = read(pfd.fd, input, sizeof(input)); if (cnt <= 0) { > > if (cnt == 0) > > pr_info("disconnected from remote nmea source"); > > else > > pr_err("failed to read from nmea source"); > > close(pfd.fd); > > pfd.fd = -1;
_______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel