mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Expose SalReasonNotFound to Linphone application
This commit is contained in:
parent
d58f20004c
commit
ae0857e88c
3 changed files with 9 additions and 3 deletions
|
|
@ -523,7 +523,6 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
|
|||
lc->vtable.display_status(lc,msg480);
|
||||
break;
|
||||
case SalReasonNotFound:
|
||||
msg=_("Not found");
|
||||
if (lc->vtable.display_status)
|
||||
lc->vtable.display_status(lc,msg);
|
||||
break;
|
||||
|
|
@ -563,10 +562,14 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
|
|||
lc->ringstream=NULL;
|
||||
}
|
||||
linphone_call_stop_media_streams (call);
|
||||
if (sr!=SalReasonDeclined) linphone_call_set_state(call,LinphoneCallError,msg);
|
||||
else{
|
||||
if (sr == SalReasonDeclined) {
|
||||
call->reason=LinphoneReasonDeclined;
|
||||
linphone_call_set_state(call,LinphoneCallEnd,"Call declined.");
|
||||
} else if (sr == SalReasonNotFound) {
|
||||
call->reason=LinphoneReasonNotFound;
|
||||
linphone_call_set_state(call,LinphoneCallError,"User not found.");
|
||||
} else {
|
||||
linphone_call_set_state(call,LinphoneCallError,msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4365,6 +4365,8 @@ const char *linphone_reason_to_string(LinphoneReason err){
|
|||
return "Bad credentials";
|
||||
case LinphoneReasonDeclined:
|
||||
return "Call declined";
|
||||
case LinphoneReasonNotFound:
|
||||
return "User not found";
|
||||
}
|
||||
return "unknown error";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ enum _LinphoneReason{
|
|||
LinphoneReasonNoResponse, /**<No response received from remote*/
|
||||
LinphoneReasonBadCredentials, /**<Authentication failed due to bad or missing credentials*/
|
||||
LinphoneReasonDeclined, /**<The call has been declined*/
|
||||
LinphoneReasonNotFound,
|
||||
};
|
||||
|
||||
typedef enum _LinphoneReason LinphoneReason;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue