diff --git a/clock.c b/clock.c index 6f9cc21..b928f56 100644 --- a/clock.c +++ b/clock.c @@ -442,6 +442,7 @@ static int clock_management_fill_response(struct clock *c, struct port *p, } sen = (struct subscribe_events_np *)tlv->data; clock_get_subscription(c, req, sen->bitmask, &sen->duration); + datalen = sizeof(*sen); break; default: /* The caller should *not* respond to this message. */ @@ -513,8 +514,7 @@ static int clock_management_set(struct clock *c, struct port *p, break; case TLV_SUBSCRIBE_EVENTS_NP: sen = (struct subscribe_events_np *)tlv->data; - clock_update_subscription(c, req, sen->bitmask, - sen->duration); + clock_update_subscription(c, req, sen->bitmask, sen->duration); respond = 1; break; }