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,
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
:
>
> 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
>
&
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
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
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
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