On Wed, Nov 05, 2014 at 12:22:43PM +0100, Miroslav Lichvar wrote: > Initialize all descriptors to prevent polling invalid descriptors from > faulty ports. > > Signed-off-by: Miroslav Lichvar <mlich...@redhat.com> > --- > port.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/port.c b/port.c > index aae5910..6ce63f7 100644 > --- a/port.c > +++ b/port.c > @@ -1401,7 +1401,7 @@ static void port_disable(struct port *p) > for (i = 0; i < N_TIMER_FDS; i++) { > close(p->fda.fd[FD_ANNOUNCE_TIMER + i]); > } > - port_clear_fda(p, N_TIMER_FDS); > + port_clear_fda(p, FD_ANNOUNCE_TIMER + N_TIMER_FDS);
N_POLLFD instead? Thanks, Richard > clock_fda_changed(p->clock); > } > > @@ -2489,7 +2489,7 @@ struct port *port_open(int phc_index, > } > p->nrate.ratio = 1.0; > > - port_clear_fda(p, N_TIMER_FDS); > + port_clear_fda(p, FD_ANNOUNCE_TIMER + N_TIMER_FDS); > p->fault_fd = -1; > if (number) { > p->fault_fd = timerfd_create(CLOCK_MONOTONIC, 0); > -- > 1.9.3 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Linuxptp-devel mailing list > Linuxptp-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel ------------------------------------------------------------------------------ _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel