On Wed, May 07, 2014 at 06:23:13PM +0200, Jiri Benc wrote: > Add support for subscribing to events (run_pmc_subscribe) and receiving and > handling of received events (run_pmc_events). > > Add initial support for port status changes. > > Signed-off-by: Jiri Benc <jb...@redhat.com> > --- > phc2sys.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 109 insertions(+), 2 deletions(-) > > diff --git a/phc2sys.c b/phc2sys.c > +static void send_subscription(struct node *node) > +{ > + struct subscribe_events_np sen; > + > + memset(&sen, 0, sizeof(sen)); > + sen.duration = 180; /* 3 minutes */ > + sen.bitmask[0] = 1 << NOTIFY_PORT_STATE; > + pmc_send_set_action(node->pmc, SUBSCRIBE_EVENTS_NP, &sen, sizeof(sen)); > +}
One more comment, could you please define the 180 second constant as a macro near PMC_UPDATE_INTERVAL so it's more clear the two are related and changing one without other could break things. Thanks, -- Miroslav Lichvar ------------------------------------------------------------------------------ "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