Skip to content

Commit 6821291

Browse files
committed
MecOrchestrator: Fix missing return after failure path that caused end-iterator dereference
Uses the delayed self-message pattern consistent with the rest of the function, so the ack goes through handleMessage → sendCreateAppContextAck like all other paths.
1 parent 26912bb commit 6821291

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/simu5g/mec/orchestrator/MecOrchestrator.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ void MecOrchestrator::startMecApp(UalcmpMessage *msg)
152152
auto it = mecApplicationDescriptors_.find(appDid);
153153
if (it == mecApplicationDescriptors_.end()) {
154154
EV << "MecOrchestrator::startMecApp - Application package with AppDId[" << contAppMsg->getAppDId() << "] not onboarded." << endl;
155-
sendCreateAppContextAck(false, contAppMsg->getRequestId());
155+
MecOrchestratorMessage *meoMsg = new MecOrchestratorMessage("MecOrchestratorMessage");
156+
meoMsg->setType(CREATE_CONTEXT_APP);
157+
meoMsg->setRequestId(contAppMsg->getRequestId());
158+
meoMsg->setSuccess(false);
159+
scheduleAt(simTime() + processingTime, meoMsg);
160+
return;
156161
}
157162

158163
const ApplicationDescriptor& desc = it->second;

0 commit comments

Comments
 (0)