From d345ac5e4e2a3b73b4413c41324bfc709ff9a5c8 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 2 Apr 2012 17:39:07 +0200 Subject: [PATCH] Add port fields to remember peer delay messages. Signed-off-by: Richard Cochran --- port.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/port.c b/port.c index fa0ad45..9d88539 100644 --- a/port.c +++ b/port.c @@ -47,6 +47,9 @@ struct port { struct ptp_message *last_follow_up; struct ptp_message *last_sync; struct ptp_message *delay_req; + struct ptp_message *peer_delay_req; + struct ptp_message *peer_delay_resp; + struct ptp_message *peer_delay_fup; struct { UInteger16 announce; UInteger16 delayreq; @@ -563,6 +566,18 @@ static void port_disable(struct port *p) msg_put(p->delay_req); p->delay_req = NULL; } + if (p->peer_delay_req) { + msg_put(p->peer_delay_req); + p->peer_delay_req = NULL; + } + if (p->peer_delay_resp) { + msg_put(p->peer_delay_resp); + p->peer_delay_resp = NULL; + } + if (p->peer_delay_fup) { + msg_put(p->peer_delay_fup); + p->peer_delay_fup = NULL; + } free_foreign_masters(p); clock_remove_fda(p->clock, p, p->fda);