"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/sal/call-op.cpp" between
liblinphone-4.5.0.tar.gz and liblinphone-4.5.1.tar.gz

About: Linphone is a cross-platform high-level VoIP library implementing all SIP calling and instant messaging (IM) features within a single API.

call-op.cpp  (liblinphone-4.5.0):call-op.cpp  (liblinphone-4.5.1)
skipping to change at line 465 skipping to change at line 465
mRoot->mCallbacks.call_failure(this); mRoot->mCallbacks.call_failure(this);
} }
int SalCallOp::vfuRetryCb (void *userCtx, unsigned int events) { int SalCallOp::vfuRetryCb (void *userCtx, unsigned int events) {
auto op = static_cast<SalCallOp *>(userCtx); auto op = static_cast<SalCallOp *>(userCtx);
op->sendVfuRequest(); op->sendVfuRequest();
op->unref(); op->unref();
return BELLE_SIP_STOP; return BELLE_SIP_STOP;
} }
bool SalCallOp::checkForOrphanDialogOn2xx(belle_sip_dialog_t *dialog){
if (mDialog && dialog && mDialog != dialog
&& belle_sip_dialog_get_state(mDialog) == BELLE_SIP_DIALOG_CONFIR
MED
&& belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_CONFIRM
ED){
/* we just got a 2xx response that established a new dialog, but
a former one was already confirmed.
* This is a race condition. We should simply terminate this new
dialog by sending ACK and BYE.*/
belle_sip_request_t * ack, *bye;
belle_sip_client_transaction_t *bye_transaction;
ack = belle_sip_dialog_create_ack(dialog, belle_sip_dialog_get_lo
cal_seq_number(dialog));
belle_sip_dialog_send_ack(dialog, ack);
bye = belle_sip_dialog_create_request(dialog,"BYE");
bye_transaction = belle_sip_provider_create_client_transaction(mR
oot->mProvider, bye);
belle_sip_client_transaction_send_request(bye_transaction);
return true;
}
return false;
}
void SalCallOp::processResponseCb (void *userCtx, const belle_sip_response_event _t *event) { void SalCallOp::processResponseCb (void *userCtx, const belle_sip_response_event _t *event) {
auto op = static_cast<SalCallOp *>(userCtx); auto op = static_cast<SalCallOp *>(userCtx);
auto response = belle_sip_response_event_get_response(event); auto response = belle_sip_response_event_get_response(event);
int code = belle_sip_response_get_status_code(response); int code = belle_sip_response_get_status_code(response);
auto clientTransaction = belle_sip_response_event_get_client_transaction( event); auto clientTransaction = belle_sip_response_event_get_client_transaction( event);
if (!clientTransaction) { if (!clientTransaction) {
lWarning() << "Discarding stateless response [" << code << "] on op [" << op << "]"; lWarning() << "Discarding stateless response [" << code << "] on op [" << op << "]";
return; return;
} }
auto dialog = belle_sip_response_event_get_dialog(event); auto dialog = belle_sip_response_event_get_dialog(event);
if (op->checkForOrphanDialogOn2xx(dialog)){
/* ignored response.*/
return;
}
op->setOrUpdateDialog(dialog); op->setOrUpdateDialog(dialog);
auto dialogState = dialog ? belle_sip_dialog_get_state(dialog) : BELLE_SI P_DIALOG_NULL; auto dialogState = dialog ? belle_sip_dialog_get_state(dialog) : BELLE_SI P_DIALOG_NULL;
lInfo() << "Op [" << op << "] receiving call response [" << code << "], d ialog is [" << dialog << "] in state [" lInfo() << "Op [" << op << "] receiving call response [" << code << "], d ialog is [" << dialog << "] in state ["
<< belle_sip_dialog_state_to_string(dialogState) << "]"; << belle_sip_dialog_state_to_string(dialogState) << "]";
op->ref(); // To make sure no cb will destroy op op->ref(); // To make sure no cb will destroy op
auto request = belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(cl ientTransaction)); auto request = belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(cl ientTransaction));
string method = belle_sip_request_get_method(request); string method = belle_sip_request_get_method(request);
switch (dialogState) { switch (dialogState) {
 End of changes. 2 change blocks. 
0 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)