mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
no longer associate http proxy to sips only but allow https
This commit is contained in:
parent
5aadaf0896
commit
a919e56787
3 changed files with 7 additions and 25 deletions
|
|
@ -623,9 +623,6 @@ static int sal_add_listen_port(Sal *ctx, SalAddress* addr, bool_t is_tunneled){
|
|||
belle_sip_listening_point_set_keep_alive(lp,ctx->keep_alive);
|
||||
result = belle_sip_provider_add_listening_point(ctx->prov,lp);
|
||||
if (sal_address_get_transport(addr)==SalTransportTLS) {
|
||||
belle_sip_tls_listening_point_t *tls_lp = (belle_sip_tls_listening_point_t *)lp;
|
||||
belle_sip_tls_listening_point_set_http_proxy_host(tls_lp,ctx->http_proxy_host);
|
||||
belle_sip_tls_listening_point_set_http_proxy_port(tls_lp,ctx->http_proxy_port);
|
||||
set_tls_properties(ctx);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1196,33 +1193,18 @@ int sal_enable_pending_trans_checking(Sal *sal, bool_t value) {
|
|||
return 0;
|
||||
}
|
||||
void sal_set_http_proxy_host(Sal *sal, const char *host) {
|
||||
belle_sip_tls_listening_point_t *lp=(belle_sip_tls_listening_point_t *)belle_sip_provider_get_listening_point(sal->prov,"TLS");
|
||||
if (sal->http_proxy_host) ms_free (sal->http_proxy_host);
|
||||
if (host)
|
||||
sal->http_proxy_host = ms_strdup(host);
|
||||
else
|
||||
sal->http_proxy_host = NULL;
|
||||
|
||||
if (lp){
|
||||
belle_sip_tls_listening_point_set_http_proxy_host(lp,sal->http_proxy_host);
|
||||
belle_sip_tls_listening_point_set_http_proxy_port(lp,sal->http_proxy_port);
|
||||
}
|
||||
belle_sip_stack_set_http_proxy_host(sal->stack, host);
|
||||
}
|
||||
|
||||
void sal_set_http_proxy_port(Sal *sal, int port) {
|
||||
belle_sip_tls_listening_point_t *lp=(belle_sip_tls_listening_point_t *)belle_sip_provider_get_listening_point(sal->prov,"TLS");
|
||||
sal->http_proxy_port=port;
|
||||
if (lp){
|
||||
belle_sip_tls_listening_point_set_http_proxy_port(lp,sal->http_proxy_port);
|
||||
}
|
||||
|
||||
belle_sip_stack_set_http_proxy_port(sal->stack, port);
|
||||
}
|
||||
const char *sal_get_http_proxy_host(const Sal *sal) {
|
||||
return sal->http_proxy_host;
|
||||
return belle_sip_stack_get_http_proxy_host(sal->stack);
|
||||
}
|
||||
|
||||
int sal_get_http_proxy_port(const Sal *sal) {
|
||||
return sal->http_proxy_port;
|
||||
return belle_sip_stack_get_http_proxy_port(sal->stack);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ struct Sal{
|
|||
bool_t enable_sip_update; /*true by default*/
|
||||
SalOpSDPHandling default_sdp_handling;
|
||||
bool_t pending_trans_checking; /*testing purpose*/
|
||||
char *http_proxy_host;
|
||||
int http_proxy_port;
|
||||
};
|
||||
|
||||
typedef enum SalOpState {
|
||||
|
|
|
|||
|
|
@ -1634,7 +1634,9 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab
|
|||
lc->msevq=ms_factory_get_event_queue(ms_factory_get_fallback());
|
||||
|
||||
lc->sal=sal_init();
|
||||
|
||||
sal_set_http_proxy_host(lc->sal, linphone_core_get_http_proxy_host(lc));
|
||||
sal_set_http_proxy_port(lc->sal, linphone_core_get_http_proxy_port(lc));
|
||||
|
||||
sal_set_user_pointer(lc->sal,lc);
|
||||
sal_set_callbacks(lc->sal,&linphone_sal_callbacks);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue