diff options
author | jongwook.lee <jongwook02.lee@lge.com> | 2018-04-04 14:18:45 +0900 |
---|---|---|
committer | jongwook.lee <jongwook02.lee@lge.com> | 2018-04-19 08:11:15 +0900 |
commit | 9ccdbcc1b1f2cbd4e8ce704c5109a323d55b0f79 (patch) | |
tree | 9d35aff23c982fd5cc87eefe0e0cb102a27cbdb5 | |
parent | 7d0f6655b04ef9af9a74319997ead5e5a1dcc2be (diff) | |
download | Open-AVB-9ccdbcc1b1f2cbd4e8ce704c5109a323d55b0f79.tar.gz |
gptp : fix race confition that try to delete pdelay request object.
A object of pdelay_req is managed(create&delete) at ethe_port.
but it also could be deleted at a step for processing of pdelay_resp.
Thus, there is a race condition.
Those sequence should be deleted for some reasons below:
1. If pdelay_req is trigged in the middle of processing pdelay_resp, then 'null point exception' could be happened.
2. The available pdelay_req would(should) be kept until sending next pdelay_req. Becuase it is possible to receive correct pdelay_resp even after unexpected error at processing pdelay_rest.
-rw-r--r-- | daemons/gptp/common/ptp_message.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/daemons/gptp/common/ptp_message.cpp b/daemons/gptp/common/ptp_message.cpp index e8835570..936f5825 100644 --- a/daemons/gptp/common/ptp_message.cpp +++ b/daemons/gptp/common/ptp_message.cpp @@ -1818,8 +1818,6 @@ void PTPMessagePathDelayRespFollowUp::processMessage port->setPeerOffset( request_tx_timestamp, remote_req_rx_timestamp ); abort: - delete req; - eport->setLastPDelayReq(NULL); delete resp; eport->setLastPDelayResp(NULL); |