Commit 99dc5616 authored by Simon Morlat's avatar Simon Morlat

Merge remote-tracking branch 'origin/master' into dev_http

parents 0e2312ad 50da7866
......@@ -81,6 +81,10 @@ LOCAL_SRC_FILES += \
transports/tunnel_wrapper.cc
endif
ifeq ($(BUILD_RTP_MAP),1)
LOCAL_CFLAGS += -DBELLE_SDP_FORCE_RTP_MAP
endif
LOCAL_STATIC_LIBRARIES := \
antlr3
......
......@@ -29,13 +29,9 @@ LT_INIT(win32-dll disable-static)
dnl Workaround for mingw, whose compiler doesn't check in /usr/include ...
case "$target_os" in
*mingw*)
if test "$cross_compiling" = "yes"; then
CPPFLAGS="$CPPFLAGS -DUSE_FIXED_NAMESERVERS"
else
if test "$prefix" = "/usr" ; then
CPPFLAGS="$CPPFLAGS -I/usr/include"
LDFLAGS="$LDFLAGS -L/usr/lib"
fi
if test "$prefix" = "/usr" ; then
CPPFLAGS="$CPPFLAGS -I/usr/include"
LDFLAGS="$LDFLAGS -L/usr/lib"
fi
;;
esac
......
......@@ -112,6 +112,12 @@ BELLESIP_EXPORT void belle_sip_stack_set_default_dscp(belle_sip_stack_t *stack,
**/
BELLESIP_EXPORT int belle_sip_stack_get_default_dscp(belle_sip_stack_t *stack);
/**
* Returns TRUE if TLS support has been compiled into, FALSE otherwise.
**/
BELLESIP_EXPORT int belle_sip_stack_tls_available(belle_sip_stack_t *stack);
BELLE_SIP_END_DECLS
#endif
......
......@@ -871,6 +871,10 @@ static const char *get_uri_parameter_noescapes() {
token = 1*(alphanum / "-" / "." / "!" / "%" / "*"
/ "_" / "+" / "`" / "'" / "~" )
*/
//param-unreserved =
noescapes_add_list(noescapes,"[]/:&+$");
// token
noescapes_add_alfanums(noescapes);
noescapes_add_list(noescapes, "-.!%*_+`'~");
......
......@@ -85,13 +85,12 @@ belle_sip_listening_point_t * belle_sip_stream_listening_point_new(belle_sip_sta
struct belle_sip_tls_listening_point{
belle_sip_stream_listening_point_t base;
#ifdef HAVE_OPENSSL
SSL_CTX *ssl_context;
#endif
char *root_ca;
int verify_exceptions;
};
int belle_sip_tls_listening_point_available(void);
BELLE_SIP_DECLARE_CUSTOM_VPTR_BEGIN(belle_sip_tls_listening_point_t,belle_sip_listening_point_t)
BELLE_SIP_DECLARE_CUSTOM_VPTR_END
#define BELLE_SIP_TLS_LISTENING_POINT(obj) BELLE_SIP_CAST(obj,belle_sip_tls_listening_point_t)
......
......@@ -403,7 +403,8 @@ static void channel_on_sending(belle_sip_channel_listener_t *obj, belle_sip_chan
if (strcmp(transport,"udp")==0){
belle_sip_parameters_remove_parameter(BELLE_SIP_PARAMETERS(contact_uri),"transport");
}else{
belle_sip_uri_set_transport_param(contact_uri,transport);
if (!belle_sip_uri_is_secure(contact_uri))
belle_sip_uri_set_transport_param(contact_uri,transport);
}
if (port!=belle_sip_listening_point_get_well_known_port(transport)) {
belle_sip_uri_set_port(contact_uri,port);
......
......@@ -217,3 +217,7 @@ int belle_sip_stack_get_default_dscp(belle_sip_stack_t *stack){
return stack->dscp;
}
int belle_sip_stack_tls_available(belle_sip_stack_t *stack){
return belle_sip_tls_listening_point_available();
}
......@@ -101,6 +101,10 @@ int belle_sip_tls_listening_point_set_verify_exceptions(belle_sip_tls_listening_
return 0;
}
int belle_sip_tls_listening_point_available(void){
return TRUE;
}
#else
belle_sip_listening_point_t * belle_sip_tls_listening_point_new(belle_sip_stack_t *s, const char *ipaddress, int port){
......@@ -115,5 +119,9 @@ int belle_sip_tls_listening_point_set_verify_exceptions(belle_sip_tls_listening_
return -1;
}
int belle_sip_tls_listening_point_available(void){
return FALSE;
}
#endif
......@@ -237,14 +237,14 @@ static void test_escaped_passwd(void) {
static void test_escaped_parameter(void) {
belle_sip_uri_t* L_tmp;
belle_sip_uri_t * L_uri = belle_sip_uri_parse("sip:toto@titi.com;pa%3Dram=aa%40bb;o%40");
belle_sip_uri_t * L_uri = belle_sip_uri_parse("sip:toto@titi.com;pa%3Dram=aa%40bb:5060[];o%40");
char* l_raw_uri = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_uri));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri));
L_tmp = belle_sip_uri_parse(l_raw_uri);
L_uri = BELLE_SIP_URI(belle_sip_object_clone(BELLE_SIP_OBJECT(L_tmp)));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_tmp));
belle_sip_free(l_raw_uri);
CU_ASSERT_STRING_EQUAL(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(L_uri), "pa=ram"), "aa@bb");
CU_ASSERT_STRING_EQUAL(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(L_uri), "pa=ram"), "aa@bb:5060[]");
CU_ASSERT_TRUE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri), "o@"));
CU_ASSERT_STRING_EQUAL(belle_sip_uri_get_host(L_uri), "titi.com");
belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri));
......
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