tweak error handling. Found by Klockwork (www.klocwork.com)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8483 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
05b9c163ed
commit
fd2bf46710
|
@ -1436,7 +1436,7 @@ SWITCH_STANDARD_APP(att_xfer_function)
|
||||||
timelimit = atoi(var);
|
timelimit = atoi(var);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
|
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS || !peer_session) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1476,12 +1476,9 @@ SWITCH_STANDARD_APP(att_xfer_function)
|
||||||
switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, bond);
|
switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, bond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_core_session_rwunlock(peer_session);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
if (peer_session) {
|
|
||||||
switch_core_session_rwunlock(peer_session);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch_channel_set_variable(channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
|
switch_channel_set_variable(channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue