Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 01:33:42PM +0200, Lars Munch wrote: > Read returns 0 (the traditional "end-of-file" return) when a remote > peer performs an orderly shutdown. Hence, ts2phc needs to close the > socket and try to establish a new connection. > > Signed-off-by: Lars Munch Applied. Thanks,

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-15 Thread Lars Munch
To: Geva, Erez (ext) (DI PA DCP R&D 3) > > 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 > > wrote: > > > > > > M

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-15 Thread Lars Munch
: > > Yes. > > -Original Message- > From: Lars Munch > Sent: Friday, 14 May 2021 18:20 > To: Geva, Erez (ext) (DI PA DCP R&D 3) > Cc: linuxptp-devel@lists.sourceforge.net > Subject: Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer > shutdown > &

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-14 Thread Geva, Erez
Yes. -Original Message- From: Lars Munch Sent: Friday, 14 May 2021 18:20 To: Geva, Erez (ext) (DI PA DCP R&D 3) 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 w

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-14 Thread Lars Munch
On Fri, May 14, 2021 at 4:24 PM Geva, Erez 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

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-14 Thread Geva, Erez
Make sense to handle 0, end of file. But as it is NOT an error, perhaps it should use a proper pr_info(). Erez -Original Message- From: Lars Munch Sent: Friday, 14 May 2021 13:34 To: linuxptp-devel@lists.sourceforge.net Subject: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer

[Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-05-14 Thread Lars Munch
Read returns 0 (the traditional "end-of-file" return) when a remote peer performs an orderly shutdown. Hence, ts2phc needs to close the socket and try to establish a new connection. Signed-off-by: Lars Munch --- ts2phc_nmea_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g