MT#59962 CallLeg: use WARN() instead of ILOG_DLG()

We are passing here null pointer (so `this->dlg->getCallid()`)
which isn't good.

Just use a default `WARN()` instead.

Fixes:

*** CID 549008:  Null pointer dereferences  (FORWARD_NULL)
/apps/sbc/CallLeg.cpp: 193 in CallLeg::CallLeg(const CallLeg*, AmSipDialog *, AmSipSubscription *)()
187
188       // enable OA for the purpose of hold request detection
189       if (dlg) {
190         dlg->setOAEnabled(true);
191         dlg->setOAForceSDP(false);
192       }
>>>     CID 549008:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "this->dlg->getCallid()" to "c_str", which dereferences it.
          [Note: The source code implementation of the function has been overridden by a builtin model.]
193       else ILOG_DLG(L_WARN, "can't enable OA!\n");
194
195       // code below taken from createCalleeSession
196
197       const AmSipDialog* caller_dlg = caller->dlg;
198

Change-Id: If1f62386c9a2d3f6df4a12a2b157802b8a0677fa
mr13.4
Donat Zenichev 1 year ago
parent 838c1364f5
commit 39bd31eea3

@ -189,8 +189,9 @@ CallLeg::CallLeg(const CallLeg* caller, AmSipDialog* p_dlg, AmSipSubscription* p
if (dlg) {
dlg->setOAEnabled(true);
dlg->setOAForceSDP(false);
} else {
WARN("can't enable OA!\n");
}
else ILOG_DLG(L_WARN, "can't enable OA!\n");
// code below taken from createCalleeSession
@ -255,10 +256,11 @@ CallLeg::CallLeg(AmSipDialog* p_dlg, AmSipSubscription* p_subs)
if (dlg) {
dlg->setOAEnabled(true);
dlg->setOAForceSDP(false);
} else {
WARN("can't enable OA!\n");
}
else ILOG_DLG(L_WARN, "can't enable OA!\n");
}
CallLeg::~CallLeg()
{
// do necessary cleanup (might be needed if the call leg is destroyed other

Loading…
Cancel
Save