Commit 826e86da authored by Simon Morlat's avatar Simon Morlat
Browse files

Revert "fix compilation witout tls"

This reverts commit 9b1e2147eeba9efbe594e8853f45630e13f8333b.
parent c41b0be4
...@@ -54,8 +54,7 @@ libbellesip_la_SOURCES= \ ...@@ -54,8 +54,7 @@ libbellesip_la_SOURCES= \
transports/stream_channel.c \ transports/stream_channel.c \
transports/stream_channel.h \ transports/stream_channel.h \
transports/stream_listeningpoint.c \ transports/stream_listeningpoint.c \
transports/tls_listeningpoint.c \ transports/tls_listeningpoint.c
transports/tls_channel.c
if BUILD_TLS if BUILD_TLS
libbellesip_la_SOURCES+=transports/tls_channel.c libbellesip_la_SOURCES+=transports/tls_channel.c
endif endif
......
...@@ -43,6 +43,7 @@ static void _gnutls_log_func( int level, const char* log) { ...@@ -43,6 +43,7 @@ static void _gnutls_log_func( int level, const char* log) {
} }
#endif /*HAVE_GNUTLS*/ #endif /*HAVE_GNUTLS*/
belle_sip_stack_t * belle_sip_stack_new(const char *properties){ belle_sip_stack_t * belle_sip_stack_new(const char *properties){
int result;
belle_sip_stack_t *stack=belle_sip_object_new(belle_sip_stack_t); belle_sip_stack_t *stack=belle_sip_object_new(belle_sip_stack_t);
stack->ml=belle_sip_main_loop_new (); stack->ml=belle_sip_main_loop_new ();
stack->timer_config.T1=500; stack->timer_config.T1=500;
...@@ -55,13 +56,10 @@ belle_sip_stack_t * belle_sip_stack_new(const char *properties){ ...@@ -55,13 +56,10 @@ belle_sip_stack_t * belle_sip_stack_new(const char *properties){
CRYPTO_set_locking_callback(&locking_function);*/ CRYPTO_set_locking_callback(&locking_function);*/
#endif #endif
#ifdef HAVE_GNUTLS #ifdef HAVE_GNUTLS
{ /*gnutls_global_set_log_level(9);*/
int result; gnutls_global_set_log_function(_gnutls_log_func);
/*gnutls_global_set_log_level(9);*/ if ((result = gnutls_global_init ()) <0) {
gnutls_global_set_log_function(_gnutls_log_func); belle_sip_fatal("Cannot initialize gnu tls caused by [%s]",gnutls_strerror(result));
if ((result = gnutls_global_init ()) <0) {
belle_sip_fatal("Cannot initialize gnu tls caused by [%s]",gnutls_strerror(result));
}
} }
#endif #endif
return stack; return stack;
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
#include "belle_sip_internal.h" #include "belle_sip_internal.h"
#include "belle-sip/mainloop.h" #include "belle-sip/mainloop.h"
#include "stream_channel.h" #include "stream_channel.h"
#ifdef HAVE_GNUTLS #ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#else if HAVE_OPENSSL
#include "openssl/ssl.h"
#endif
/*************tls********/ /*************tls********/
struct belle_sip_tls_channel{ struct belle_sip_tls_channel{
...@@ -225,14 +226,10 @@ error: ...@@ -225,14 +226,10 @@ error:
} }
#else
belle_sip_channel_t * belle_sip_channel_new_tls(belle_sip_tls_listening_point_t *lp,const char *bindip, int localport, const char *dest, int port){
return NULL;
}
#endif
......
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