Commit c41b0be4 authored by Simon Morlat's avatar Simon Morlat

fix compilation witout tls

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