fix typo in dnd reason

This commit is contained in:
Jehan Monnier 2013-07-23 21:18:28 +02:00
parent 3051c9bdad
commit 7c27400203
4 changed files with 7 additions and 22 deletions

View file

@ -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";

View file

@ -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*/
};

View file

@ -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;

View file

@ -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;