Commit 41bbe03b authored by Aurelio Colosimo's avatar Aurelio Colosimo

passive and listening state: handle SYNC msg

parent 58f064cc
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
TimeInternal time; /* TODO: handle it, see handle(...) in protocol.c */
int e = 0; /* error var, to check errors in msg handling */ int e = 0; /* error var, to check errors in msg handling */
if (ppi->is_new_state) if (ppi->is_new_state)
...@@ -22,6 +23,10 @@ int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -22,6 +23,10 @@ int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen)
e = st_com_master_handle_announce(ppi, pkt, plen); e = st_com_master_handle_announce(ppi, pkt, plen);
break; break;
case PPM_SYNC:
e = st_com_master_handle_sync(ppi, pkt, plen, &time);
break;
default: default:
/* disreguard, nothing to do */ /* disreguard, nothing to do */
break; break;
......
...@@ -31,6 +31,10 @@ int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -31,6 +31,10 @@ int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen)
e = st_com_handle_pdelay_req(ppi, pkt, plen, &time); e = st_com_handle_pdelay_req(ppi, pkt, plen, &time);
break; break;
case PPM_SYNC:
e = st_com_master_handle_sync(ppi, pkt, plen, &time);
break;
default: default:
/* disreguard, nothing to do */ /* disreguard, nothing to do */
break; break;
......
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