Commit 633e6597 authored by Aurelio Colosimo's avatar Aurelio Colosimo

proto-standard/* updated to proto-ext-whiterabbit/*

This commit does not introduce any significant modification, but only
reports in proto-standard some minor modifications done in proto-ext-whiterabbit
parent bf4eb4d1
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
* Based on PTPd project v. 2.1.0 (see AUTHORS for details) * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
*/ */
#ifndef __COMMON_FUN_H
#define __COMMON_FUN_H
#include <ppsi/ppsi.h> #include <ppsi/ppsi.h>
/* Contains all functions common to more than one state */ /* Contains all functions common to more than one state */
...@@ -35,3 +38,5 @@ int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf, ...@@ -35,3 +38,5 @@ int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf,
int st_com_handle_pdelay_req(struct pp_instance *ppi, unsigned char *buf, int st_com_handle_pdelay_req(struct pp_instance *ppi, unsigned char *buf,
int len); int len);
#endif /* __COMMON_FUN_H */
...@@ -215,6 +215,8 @@ int msg_pack_announce(struct pp_instance *ppi) ...@@ -215,6 +215,8 @@ int msg_pack_announce(struct pp_instance *ppi)
PP_CLOCK_IDENTITY_LENGTH); PP_CLOCK_IDENTITY_LENGTH);
*(UInteger16 *) (buf + 61) = htons(DSCUR(ppi)->stepsRemoved); *(UInteger16 *) (buf + 61) = htons(DSCUR(ppi)->stepsRemoved);
*(Enumeration8 *) (buf + 63) = DSPRO(ppi)->timeSource; *(Enumeration8 *) (buf + 63) = DSPRO(ppi)->timeSource;
return PP_ANNOUNCE_LENGTH;
} }
/* Unpack Announce message from in buffer of ppi to msgtmp. Announce */ /* Unpack Announce message from in buffer of ppi to msgtmp. Announce */
...@@ -243,7 +245,6 @@ void msg_unpack_announce(void *buf, MsgAnnounce *ann) ...@@ -243,7 +245,6 @@ void msg_unpack_announce(void *buf, MsgAnnounce *ann)
msg_display_announce(ann); msg_display_announce(ann);
} }
/* Pack Follow Up message into out buffer of ppi*/ /* Pack Follow Up message into out buffer of ppi*/
void msg_pack_follow_up(struct pp_instance *ppi, Timestamp *prec_orig_tstamp) void msg_pack_follow_up(struct pp_instance *ppi, Timestamp *prec_orig_tstamp)
{ {
...@@ -324,7 +325,6 @@ void msg_pack_pdelay_req(struct pp_instance *ppi, Timestamp *orig_tstamp) ...@@ -324,7 +325,6 @@ void msg_pack_pdelay_req(struct pp_instance *ppi, Timestamp *orig_tstamp)
/* RAZ reserved octets */ /* RAZ reserved octets */
} }
/* pack DelayReq message into out buffer of ppi */ /* pack DelayReq message into out buffer of ppi */
void msg_pack_delay_req(struct pp_instance *ppi, Timestamp *orig_tstamp) void msg_pack_delay_req(struct pp_instance *ppi, Timestamp *orig_tstamp)
{ {
...@@ -354,7 +354,6 @@ void msg_pack_delay_req(struct pp_instance *ppi, Timestamp *orig_tstamp) ...@@ -354,7 +354,6 @@ void msg_pack_delay_req(struct pp_instance *ppi, Timestamp *orig_tstamp)
*(UInteger32 *) (buf + 40) = htonl(orig_tstamp->nanosecondsField); *(UInteger32 *) (buf + 40) = htonl(orig_tstamp->nanosecondsField);
} }
/* pack DelayResp message into OUT buffer of ppi */ /* pack DelayResp message into OUT buffer of ppi */
void msg_pack_delay_resp(struct pp_instance *ppi, void msg_pack_delay_resp(struct pp_instance *ppi,
MsgHeader *hdr, Timestamp *rcv_tstamp) MsgHeader *hdr, Timestamp *rcv_tstamp)
...@@ -448,8 +447,6 @@ void msg_unpack_delay_req(void *buf, MsgDelayReq *delay_req) ...@@ -448,8 +447,6 @@ void msg_unpack_delay_req(void *buf, MsgDelayReq *delay_req)
PP_VPRINTF("\n"); PP_VPRINTF("\n");
} }
/* Unpack PdelayReq message from IN buffer of ppi to msgtmp.req */ /* Unpack PdelayReq message from IN buffer of ppi to msgtmp.req */
void msg_unpack_pdelay_req(void *buf, MsgPDelayReq *pdelay_req) void msg_unpack_pdelay_req(void *buf, MsgPDelayReq *pdelay_req)
{ {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/* /*
* Initializes network and other stuff * Initializes network and other stuff
*/ */
static int pp_did_init; static int pp_did_init = 0;
int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
...@@ -30,6 +30,9 @@ int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -30,6 +30,9 @@ int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
pp_timer_start(1 << DSPOR(ppi)->logMinPdelayReqInterval, pp_timer_start(1 << DSPOR(ppi)->logMinPdelayReqInterval,
ppi->timers[PP_TIMER_PDELAYREQ]); ppi->timers[PP_TIMER_PDELAYREQ]);
/* Send an announce immediately, when becomes master */
if (msg_issue_announce(ppi) < 0)
goto failure;
} }
if (st_com_check_record_update(ppi)) if (st_com_check_record_update(ppi))
......
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