Commit 4f40367e authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

proto-standard: uncomment all DBGV lines

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent f4ef8683
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* FIXME header * FIXME header
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
/* Local clock is becoming Master. Table 13 (9.3.5) of the spec. */ /* Local clock is becoming Master. Table 13 (9.3.5) of the spec. */
void m1(struct pp_instance *ppi) void m1(struct pp_instance *ppi)
...@@ -104,10 +105,11 @@ Integer8 bmc_dataset_cmp(struct pp_instance *ppi, ...@@ -104,10 +105,11 @@ Integer8 bmc_dataset_cmp(struct pp_instance *ppi,
MsgHeader *hdr_a, MsgAnnounce *ann_a, MsgHeader *hdr_a, MsgAnnounce *ann_a,
MsgHeader *hdr_b, MsgAnnounce *ann_b) MsgHeader *hdr_b, MsgAnnounce *ann_b)
{ {
/* FIXME DBGV("Data set comparison \n"); */
short comp = 0; short comp = 0;
Octet *ppci; Octet *ppci;
DBGV("Data set comparison\n");
/* Identity comparison */ /* Identity comparison */
if (!pp_memcmp(ann_a->grandmasterIdentity, if (!pp_memcmp(ann_a->grandmasterIdentity,
ann_b->grandmasterIdentity, PP_CLOCK_IDENTITY_LENGTH)) { ann_b->grandmasterIdentity, PP_CLOCK_IDENTITY_LENGTH)) {
...@@ -306,7 +308,7 @@ UInteger8 bmc(struct pp_instance *ppi, struct pp_frgn_master *frgn_master, ...@@ -306,7 +308,7 @@ UInteger8 bmc(struct pp_instance *ppi, struct pp_frgn_master *frgn_master,
&frgn_master[best].ann) < 0) &frgn_master[best].ann) < 0)
best = i; best = i;
/* FIXME DBGV("Best record : %d \n",best); */ DBGV_ARGS("Best record : %d\n", best);
ppi->foreign_record_best = best; ppi->foreign_record_best = best;
return bmc_state_decision(ppi, &frgn_master[best].hdr, return bmc_state_decision(ppi, &frgn_master[best].hdr,
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
* FIXME: header * FIXME: header
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
#include "common-fun.h" #include "common-fun.h"
void st_com_execute_slave(struct pp_instance *ppi) void st_com_execute_slave(struct pp_instance *ppi)
{ {
if (pp_timer_expired(ppi->timers[PP_TIMER_ANN_RECEIPT])) { if (pp_timer_expired(ppi->timers[PP_TIMER_ANN_RECEIPT])) {
/* FIXME diag DBGV("event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES\n");
* DBGV("event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES\n");
*/
ppi->number_foreign_records = 0; ppi->number_foreign_records = 0;
ppi->foreign_record_i = 0; ppi->foreign_record_i = 0;
if (!DSDEF(ppi)->slaveOnly && if (!DSDEF(ppi)->slaveOnly &&
...@@ -24,17 +23,13 @@ void st_com_execute_slave(struct pp_instance *ppi) ...@@ -24,17 +23,13 @@ void st_com_execute_slave(struct pp_instance *ppi)
if (ppi->rt_opts->e2e_mode) { if (ppi->rt_opts->e2e_mode) {
if (pp_timer_expired(ppi->timers[PP_TIMER_DELAYREQ])) { if (pp_timer_expired(ppi->timers[PP_TIMER_DELAYREQ])) {
/* FIXME diag DBGV("TODO: event DELAYREQ_INTERVAL_TIMEOUT_EXPIRES\n");
* DBGV("event DELAYREQ_INTERVAL_TIMEOUT_EXPIRES\n");
*/
/* TODO issueDelayReq(rtOpts,ptpClock); */ /* TODO issueDelayReq(rtOpts,ptpClock); */
} }
} else { } else {
if (pp_timer_expired(ppi->timers[PP_TIMER_PDELAYREQ])) if (pp_timer_expired(ppi->timers[PP_TIMER_PDELAYREQ]))
{ {
/* FIXME diag DBGV("TODO: event PDELAYREQ_INTERVAL_TOUT_EXPIRES\n");
DBGV("event PDELAYREQ_INTERVAL_TIMEOUT_EXPIRES\n");
*/
/* TODO issuePDelayReq(rtOpts,ptpClock); */ /* TODO issuePDelayReq(rtOpts,ptpClock); */
} }
} }
...@@ -54,7 +49,7 @@ void st_com_restart_annrec_timer(struct pp_instance *ppi) ...@@ -54,7 +49,7 @@ void st_com_restart_annrec_timer(struct pp_instance *ppi)
int st_com_check_record_update(struct pp_instance *ppi) int st_com_check_record_update(struct pp_instance *ppi)
{ {
if (ppi->record_update) { if (ppi->record_update) {
/* FIXME diag DBGV("event STATE_DECISION_EVENT\n"); */ DBGV("event STATE_DECISION_EVENT\n");
ppi->record_update = FALSE; ppi->record_update = FALSE;
ppi->next_state = bmc(ppi, ppi->frgn_master, ppi->rt_opts); ppi->next_state = bmc(ppi, ppi->frgn_master, ppi->rt_opts);
...@@ -85,9 +80,8 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf) ...@@ -85,9 +80,8 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
*/ */
ppi->frgn_master[j].ann_messages++; ppi->frgn_master[j].ann_messages++;
found = 1; found = 1;
/* FIXME diag
DBGV("addForeign : AnnounceMessage incremented \n"); DBGV("addForeign : AnnounceMessage incremented \n");
*/
msg_copy_header(&ppi->frgn_master[j].hdr, hdr); msg_copy_header(&ppi->frgn_master[j].hdr, hdr);
msg_unpack_announce(buf, &ppi->frgn_master[j].ann); msg_unpack_announce(buf, &ppi->frgn_master[j].ann);
break; break;
...@@ -121,7 +115,7 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf) ...@@ -121,7 +115,7 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
msg_unpack_announce(buf, &ppi->frgn_master[j].ann); msg_unpack_announce(buf, &ppi->frgn_master[j].ann);
/* FIXME diag DBGV("New foreign Master added \n");*/ DBGV("New foreign Master added \n");
ppi->foreign_record_i = (ppi->foreign_record_i+1) % ppi->foreign_record_i = (ppi->foreign_record_i+1) %
ppi->max_foreign_records; ppi->max_foreign_records;
...@@ -228,25 +222,17 @@ int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf, ...@@ -228,25 +222,17 @@ int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf,
return -1; return -1;
if (!ppi->is_from_cur_par) { if (!ppi->is_from_cur_par) {
/* FIXME diag DBGV("SequenceID doesn't match last Sync message\n");
DBGV("SequenceID doesn't match with "
"last Sync message \n");
*/
return 0; return 0;
} }
if (!ppi->waiting_for_follow) { if (!ppi->waiting_for_follow) {
/* FIXME diag DBGV("Slave was not waiting a follow up message\n");
DBGV("Slave was not waiting a follow up "
"message \n");
*/
return 0; return 0;
} }
if (ppi->recv_sync_sequence_id != hdr->sequenceId) { if (ppi->recv_sync_sequence_id != hdr->sequenceId) {
/* FIXME diag DBGV("Follow up message is not from current parent\n");
DBGV("Follow up message is not from current parent \n");
*/
return 0; return 0;
} }
...@@ -310,15 +296,11 @@ int st_com_master_handle_announce(struct pp_instance *ppi, unsigned char *buf, ...@@ -310,15 +296,11 @@ int st_com_master_handle_announce(struct pp_instance *ppi, unsigned char *buf,
return -1; return -1;
if (ppi->is_from_self) { if (ppi->is_from_self) {
/* FIXME diag DBGV("HandleAnnounce : Ignore message from self\n");
DBGV("HandleAnnounce : Ignore message from self \n");
*/
return 0; return 0;
} }
/* FIXME diag DBGV("Announce message from another foreign master\n");
* DBGV("Announce message from another foreign master");
*/
st_com_add_foreign(ppi, buf); st_com_add_foreign(ppi, buf);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* FIXME: header * FIXME: header
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
#include "common-fun.h" #include "common-fun.h"
int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
...@@ -29,24 +30,18 @@ int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -29,24 +30,18 @@ int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
goto state_updated; goto state_updated;
if (pp_timer_expired(ppi->timers[PP_TIMER_SYNC])) { if (pp_timer_expired(ppi->timers[PP_TIMER_SYNC])) {
/* FIXME diag DBGV("TODO: event SYNC_INTERVAL_TIMEOUT_EXPIRES\n");
* DBGV("event SYNC_INTERVAL_TIMEOUT_EXPIRES\n");
*/
/* TODO issueSync(rtOpts, ptpClock); */ /* TODO issueSync(rtOpts, ptpClock); */
} }
if (pp_timer_expired(ppi->timers[PP_TIMER_ANN_INTERVAL])) { if (pp_timer_expired(ppi->timers[PP_TIMER_ANN_INTERVAL])) {
/* FIXME diag DBGV("TODO: event ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES\n");
* DBGV("event ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES\n");
*/
/* TODO issueAnnounce(rtOpts, ptpClock); */ /* TODO issueAnnounce(rtOpts, ptpClock); */
} }
if (!ppi->rt_opts->e2e_mode) { if (!ppi->rt_opts->e2e_mode) {
if (pp_timer_expired(ppi->timers[PP_TIMER_PDELAYREQ])) { if (pp_timer_expired(ppi->timers[PP_TIMER_PDELAYREQ])) {
/* FIXME diag DBGV("TODO: event PDELAYREQ_INTERVAL_TOUT_EXPIRES\n");
* DBGV("event PDELAYREQ_INTERVAL_TIMEOUT_EXPIRES\n");
*/
/* TODO issuePDelayReq(rtOpts,ptpClock); */ /* TODO issuePDelayReq(rtOpts,ptpClock); */
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* FIXME: header * FIXME: header
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
#include "common-fun.h" #include "common-fun.h"
int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
...@@ -115,10 +116,8 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -115,10 +116,8 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
hdr->logMessageInterval; hdr->logMessageInterval;
} else { } else {
/* FIXME diag DBGV("TODO: HandledelayResp : "
DBGV("HandledelayResp : " "delayResp doesn't match delayReq.\n");
"delayResp doesn't match with the delayReq. \n");
*/
} }
break; break;
...@@ -196,10 +195,8 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen) ...@@ -196,10 +195,8 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
*/ */
} }
} else { } else {
/* FIXME diag DBGV("TODO: HandlePdelayResp : Pdelayresp doesn't "
DBGV("HandlePdelayResp : Pdelayresp doesn't " "match PdelayReq.\n");
"match with the PdelayReq. \n");
*/
} }
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