Respond to the default data set management query.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-12-01 08:32:40 +01:00
parent 2722b8587d
commit cc7c724eb0
1 changed files with 5 additions and 1 deletions

View File

@ -148,6 +148,11 @@ static int clock_management_response(struct clock *c, struct port *p, int id,
tlv->id = id; tlv->id = id;
switch (id) { switch (id) {
case DEFAULT_DATA_SET:
memcpy(tlv->data, &c->dds, sizeof(c->dds));
datalen = sizeof(c->dds);
respond = 1;
break;
case CURRENT_DATA_SET: case CURRENT_DATA_SET:
memcpy(tlv->data, &c->cur, sizeof(c->cur)); memcpy(tlv->data, &c->cur, sizeof(c->cur));
datalen = sizeof(c->cur); datalen = sizeof(c->cur);
@ -624,7 +629,6 @@ void clock_manage(struct clock *c, struct port *p, struct ptp_message *msg)
case INITIALIZE: case INITIALIZE:
case FAULT_LOG: case FAULT_LOG:
case FAULT_LOG_RESET: case FAULT_LOG_RESET:
case DEFAULT_DATA_SET:
case PARENT_DATA_SET: case PARENT_DATA_SET:
case TIME_PROPERTIES_DATA_SET: case TIME_PROPERTIES_DATA_SET:
case PRIORITY1: case PRIORITY1: