Commit 7c274002 authored by jehan's avatar jehan

fix typo in dnd reason

parent 3051c9bd
......@@ -3345,27 +3345,12 @@ int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *the_call)
* @param reason the reason for rejecting the call: LinphoneReasonDeclined or LinphoneReasonBusy
**/
int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneReason reason){
SalReason sal_reason=SalReasonUnknown;
if (call->state!=LinphoneCallIncomingReceived && call->state!=LinphoneCallIncomingEarlyMedia){
ms_error("linphone_core_decline_call(): Cannot decline a call that is in state %s",linphone_call_state_to_string(call->state));
return -1;
}
switch(reason){
case LinphoneReasonDeclined:
sal_reason=SalReasonDeclined;
break;
case LinphoneReasonBusy:
sal_reason=SalReasonBusy;
break;
case LinphoneReasonDoNotDistrub:
sal_reason = SalReasonDoNotDisturb;
break;
default:
ms_error("linphone_core_decline_call(): unsupported reason %s",linphone_reason_to_string(reason));
return -1;
break;
}
sal_call_decline(call->op,sal_reason,NULL);
sal_call_decline(call->op,linphone_reason_to_sal(reason),NULL);
terminate_call(lc,call);
return 0;
}
......@@ -5785,7 +5770,7 @@ const char *linphone_reason_to_string(LinphoneReason err){
return "Incompatible media capabilities";
case LinphoneReasonIOError:
return "IO error";
case LinphoneReasonDoNotDistrub:
case LinphoneReasonDoNotDisturb:
return "Do not distrub";
}
return "unknown error";
......
......@@ -134,7 +134,7 @@ enum _LinphoneReason{
LinphoneReasonBusy, /**<Phone line was busy */
LinphoneReasonMedia, /**<Incompatible media */
LinphoneReasonIOError, /**<Transport error: connection failures, disconnections etc...*/
LinphoneReasonDoNotDistrub /*Do not disturb reason*/
LinphoneReasonDoNotDisturb /*Do not disturb reason*/
};
......
......@@ -1179,7 +1179,7 @@ SalReason linphone_reason_to_sal(LinphoneReason reason){
return SalReasonMedia;
case LinphoneReasonIOError:
return SalReasonServiceUnavailable;
case LinphoneReasonDoNotDistrub:
case LinphoneReasonDoNotDisturb:
return SalReasonDoNotDisturb;
}
return SalReasonUnknown;
......@@ -1198,7 +1198,7 @@ LinphoneReason linphone_reason_from_sal(SalReason r){
ret=LinphoneReasonDeclined;
break;
case SalReasonDoNotDisturb:
ret=LinphoneReasonDoNotDistrub;
ret=LinphoneReasonDoNotDisturb;
break;
case SalReasonForbidden:
ret=LinphoneReasonBadCredentials;
......
......@@ -43,7 +43,7 @@ public class Reason {
/**
* Transport error: connection failures, disconnections etc...
* */
static public Reason DoNotDistrub = new Reason(9,"DoNotDistrub");
static public Reason DoNotDisturb = new Reason(9,"DoNotDisturb");
protected final int mValue;
private final String mStringValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment