Commit 0d89be5b authored by jehan's avatar jehan
Browse files

fix tls for 32/64 bits os

parent 97a1ee21
......@@ -126,6 +126,8 @@ static int process_data(belle_sip_channel_t *obj,unsigned int revents){
char ssl_error_string[128];
#endif /*HAVE_OPENSSL*/
belle_sip_fd_t fd=belle_sip_source_get_fd((belle_sip_source_t*)channel);
gnutls_transport_ptr_t transport_ptr=NULL;
transport_ptr+=fd; /*to avoid compilation warning on 32/64 bits*/
if (obj->state == BELLE_SIP_CHANNEL_CONNECTING) {
if (!channel->socket_connected) {
if (finalize_stream_connection(fd,(struct sockaddr*)&channel->ss,&addrlen)) {
......@@ -137,7 +139,7 @@ static int process_data(belle_sip_channel_t *obj,unsigned int revents){
}
/*connected, now establishing TLS connection*/
#if HAVE_GNUTLS
gnutls_transport_set_ptr2(channel->session, (gnutls_transport_ptr_t)channel,(gnutls_transport_ptr_t) (&fd));
gnutls_transport_set_ptr2(channel->session, (gnutls_transport_ptr_t)channel,transport_ptr);
result = gnutls_handshake(channel->session);
if ((result < 0 && gnutls_error_is_fatal (result) == 0)) {
belle_sip_message("TLS connection in progress for channel [%p]",channel);
......
......@@ -316,7 +316,7 @@ int belle_sip_register_test_suite(){
if (NULL == CU_add_test(pSuite, "stateful-tcp-register", stateful_register_tcp)) {
return CU_get_error();
}
if (NULL == CU_add_test(pSuite, "stateful tls register", stateful_register_tls)) {
if (NULL == CU_add_test(pSuite, "stateful-tls-register", stateful_register_tls)) {
return CU_get_error();
}
if (NULL == CU_add_test(pSuite, "stateless udp register", stateless_register_udp)) {
......
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