Signed-off-by: Anders Selhammer <[email protected]>
---
port.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/port.c b/port.c
index 3e61179..cef8c2b 100644
--- a/port.c
+++ b/port.c
@@ -963,7 +963,6 @@ static int port_management_set(struct port *target,
struct port *ingress, int id,
struct ptp_message *req)
{
- int respond = 0;
struct management_tlv *tlv;
struct port_ds_np *pdsnp;
@@ -973,12 +972,15 @@ static int port_management_set(struct port *target,
case TLV_PORT_DATA_SET_NP:
pdsnp = (struct port_ds_np *) tlv->data;
target->neighborPropDelayThresh =
pdsnp->neighborPropDelayThresh;
- respond = 1;
break;
+ default:
+ /* The caller should *not* respond to this message. */
+ return 0;
}
- if (respond && !port_management_get_response(target, ingress, id, req))
+ if (!port_management_get_response(target, ingress, id, req)) {
pr_err("port %hu: failed to send management set response",
portnum(target));
- return respond ? 1 : 0;
+ }
+ return 1;
}
static void port_nrate_calculate(struct port *p, tmv_t origin, tmv_t ingress)
--
1.8.3.1
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel