Commit 6cb30529 authored by Omar Gabella's avatar Omar Gabella

KM3NET BROADCAST : Force the WRS_WR_LINK_ON after recive ANNOUNCE message in…

KM3NET BROADCAST : Force the WRS_WR_LINK_ON after recive ANNOUNCE message in wr_handle_announce instead of pp_lib_handle_announce.
parent 8ceb1f84
......@@ -197,8 +197,13 @@ static int wr_handle_announce(struct pp_instance *ppi)
(1 /* FIXME: Recommended State, see page 33*/) &&
(WR_DSPOR(ppi)->parentWrConfig & WR_M_ONLY) &&
(!WR_DSPOR(ppi)->wrModeOn || !WR_DSPOR(ppi)->parentWrModeOn)) {
#ifdef BROADCAST
/* We don't want to start the handshake procedure in broadcast mode. */
ppi->next_state = WRS_WR_LINK_ON;
#else
/* We must start the handshake as a WR slave */
wr_handshake_init(ppi, PPS_SLAVE);
#endif
}
return 0;
}
......
......@@ -149,20 +149,20 @@ static void __lib_add_foreign(struct pp_instance *ppi, unsigned char *buf)
int pp_lib_handle_announce(struct pp_instance *ppi, unsigned char *buf, int len)
{
#ifdef BROADCAST
struct wr_dsport *wrp = WR_DSPOR(ppi);
#endif
//#ifdef BROADCAST
// struct wr_dsport *wrp = WR_DSPOR(ppi);
//#endif
__lib_add_foreign(ppi, buf);
ppi->next_state = bmc(ppi); /* got a new announce: run bmc */
pp_timeout_set(ppi, PP_TO_ANN_RECEIPT);
#ifdef BROADCAST
/* We don't want to start the handshake procedure in broadcast mode. */
if (wrp->wrMode == WR_SLAVE)
ppi->next_state = WRS_WR_LINK_ON;
#else
// Do the same but in wr_handle_announce() #ifdef BROADCAST
// /* We don't want to start the handshake procedure in broadcast mode. */
// if (wrp->wrMode == WR_SLAVE)
// ppi->next_state = WRS_WR_LINK_ON;
//#else
if (pp_hooks.handle_announce)
return pp_hooks.handle_announce(ppi);
#endif
//#endif
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment