diff --git a/coreapi/bellesip_sal/sal_op_impl.c b/coreapi/bellesip_sal/sal_op_impl.c index ba5f1b2ef..eb799fad9 100644 --- a/coreapi/bellesip_sal/sal_op_impl.c +++ b/coreapi/bellesip_sal/sal_op_impl.c @@ -132,7 +132,7 @@ belle_sip_request_t* sal_op_build_request(SalOp *op,const char* method) { belle_sip_header_p_preferred_identity_t* p_preferred_identity=belle_sip_header_p_preferred_identity_create(BELLE_SIP_HEADER_ADDRESS(sal_op_get_from_address(op))); belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(p_preferred_identity)); } - if (strcmp("REGISTER",method)!=0 && (op->privacy&(SalPrivacyNone|SalPrivacyDefault))==0 ) { /*at this level, default = none*/ + if (strcmp("REGISTER",method)!=0 && (op->privacy !=SalPrivacyNone)==0 ) { /*at this level, default = none*/ belle_sip_header_privacy_t* privacy_header=belle_sip_header_privacy_new(); if (op->privacy&SalPrivacyCritical) belle_sip_header_privacy_add_privacy(privacy_header,sal_privacy_to_string(SalPrivacyCritical)); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index bb4f4afe5..9f66bfd81 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -280,6 +280,10 @@ LINPHONE_PUBLIC void linphone_call_params_set_record_file(LinphoneCallParams *cp LINPHONE_PUBLIC const char *linphone_call_params_get_record_file(const LinphoneCallParams *cp); LINPHONE_PUBLIC void linphone_call_params_add_custom_header(LinphoneCallParams *params, const char *header_name, const char *header_value); LINPHONE_PUBLIC const char *linphone_call_params_get_custom_header(const LinphoneCallParams *params, const char *header_name); + +/* + * Note for developers: this enum must be kept synchronized with the SalPrivacy enum declared in sal.h + */ /** * @ingroup call_control * Defines privacy policy to apply as described by rfc3323 @@ -324,7 +328,7 @@ typedef enum _LinphonePrivacy { LinphonePrivacyCritical=0x10, /** - * Default privacy as defined either globally or by proxy using #linphone_proxy_config_set_privacy + * Special keyword to use privacy as defined either globally or by proxy using linphone_proxy_config_set_privacy() */ LinphonePrivacyDefault=0x8000, } LinphonePrivacy; diff --git a/include/sal/sal.h b/include/sal/sal.h index d0d0c4a8a..a96f5fb20 100644 --- a/include/sal/sal.h +++ b/include/sal/sal.h @@ -551,13 +551,13 @@ int sal_publish(SalOp *op, const char *from, const char *to, const char*event_na /*privacy, must be in sync with LinphonePrivacyMask*/ typedef enum _SalPrivacy { - SalPrivacyDefault=0x0, + SalPrivacyNone=0x0, SalPrivacyUser=0x1, SalPrivacyHeader=0x2, SalPrivacySession=0x4, SalPrivacyId=0x8, - SalPrivacyNone=0x10, - SalPrivacyCritical=0x20 + SalPrivacyCritical=0x10, + SalPrivacyDefault=0x8000 } SalPrivacy; typedef unsigned int SalPrivacyMask;