fixed PCDU memory leak
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
GomspaceDeviceHandler::GomspaceDeviceHandler(object_id_t objectId, object_id_t comIF,
|
||||
CookieIF * comCookie, uint16_t maxConfigTableAddress, uint16_t maxHkTableAddress,
|
||||
uint16_t hkTableReplySize, LocalPoolDataSetBase* hkTableDataset) :
|
||||
DeviceHandlerBase(objectId, comIF, comCookie, nullptr, 60), maxConfigTableAddress(maxConfigTableAddress),
|
||||
DeviceHandlerBase(objectId, comIF, comCookie), maxConfigTableAddress(maxConfigTableAddress),
|
||||
maxHkTableAddress(maxHkTableAddress), hkTableReplySize(hkTableReplySize), hkTableDataset(hkTableDataset) {
|
||||
mode = MODE_NORMAL;
|
||||
if (comCookie == NULL) {
|
||||
|
@ -55,18 +55,18 @@ ReturnValue_t PCDUHandler::initialize() {
|
||||
}
|
||||
|
||||
/* Subscribing for housekeeping table update messages of the PDU1 */
|
||||
// HasLocalDataPoolIF* pdu1Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU1_HANDLER);
|
||||
// if(pdu1Handler == nullptr) {
|
||||
// sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl;
|
||||
// return RETURN_FAILED;
|
||||
// }
|
||||
// result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages(
|
||||
// PDU1::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true);
|
||||
// if (result != RETURN_OK) {
|
||||
// sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
// << "PDU1Handler" << std::endl;
|
||||
// return result;
|
||||
// }
|
||||
HasLocalDataPoolIF* pdu1Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU1_HANDLER);
|
||||
if(pdu1Handler == nullptr) {
|
||||
sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessages(
|
||||
PDU1::HK_TABLE_DATA_SET_ID, this->getObjectId(), commandQueue->getId(), true);
|
||||
if (result != RETURN_OK) {
|
||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||
<< "PDU1Handler" << std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user