diff --git a/clock.c b/clock.c index 7bbb848..c0d73f0 100644 --- a/clock.c +++ b/clock.c @@ -232,7 +232,7 @@ static void clock_prune_subscriptions(struct clock *c) } void clock_send_notification(struct clock *c, struct ptp_message *msg, - int msglen, enum notification event) + enum notification event) { unsigned int event_pos = event / 8; uint8_t mask = 1 << (event % 8); @@ -1422,7 +1422,6 @@ void clock_notify_event(struct clock *c, enum notification event) struct port *uds = c->uds_port; struct PortIdentity pid = port_identity(uds); struct ptp_message *msg; - UInteger16 msg_len; int id; switch (event) { @@ -1437,10 +1436,9 @@ void clock_notify_event(struct clock *c, enum notification event) return; if (!clock_management_fill_response(c, NULL, NULL, msg, id)) goto err; - msg_len = msg->header.messageLength; if (msg_pre_send(msg)) goto err; - clock_send_notification(c, msg, msg_len, event); + clock_send_notification(c, msg, event); err: msg_put(msg); } diff --git a/clock.h b/clock.h index efde27f..cc2910a 100644 --- a/clock.h +++ b/clock.h @@ -191,11 +191,10 @@ int clock_manage(struct clock *c, struct port *p, struct ptp_message *msg); * Send notification about an event to all subscribers. * @param c The clock instance. * @param msg The PTP message to send, in network byte order. - * @param msglen The length of the message in bytes. * @param event The event that occured. */ void clock_send_notification(struct clock *c, struct ptp_message *msg, - int msglen, enum notification event); + enum notification event); /** * Construct and send notification to subscribers about an event that diff --git a/port.c b/port.c index 64c2fcf..86fca3b 100644 --- a/port.c +++ b/port.c @@ -2735,7 +2735,6 @@ void port_notify_event(struct port *p, enum notification event) { struct PortIdentity pid = port_identity(p); struct ptp_message *msg; - UInteger16 msg_len; int id; switch (event) { @@ -2752,10 +2751,9 @@ void port_notify_event(struct port *p, enum notification event) return; if (!port_management_fill_response(p, msg, id)) goto err; - msg_len = msg->header.messageLength; if (msg_pre_send(msg)) goto err; - clock_send_notification(p->clock, msg, msg_len, event); + clock_send_notification(p->clock, msg, event); err: msg_put(msg); }