Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
c41b0be4
Commit
c41b0be4
authored
Mar 21, 2012
by
Simon Morlat
Browse files
fix compilation witout tls
parent
60e0bf1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
src/Makefile.am
src/Makefile.am
+2
-1
src/sipstack.c
src/sipstack.c
+7
-5
src/transports/tls_channel.c
src/transports/tls_channel.c
+7
-4
No files found.
src/Makefile.am
View file @
c41b0be4
...
...
@@ -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
...
...
src/sipstack.c
View file @
c41b0be4
...
...
@@ -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
;
...
...
src/transports/tls_channel.c
View file @
c41b0be4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment