Commit 9c4b76c9 authored by Sandrine Avakian's avatar Sandrine Avakian

Updating error messages with new functions name.

parent 3139ec12
......@@ -1166,12 +1166,12 @@ int belle_sip_get_src_addr_for(const struct sockaddr *dest, socklen_t destlen, s
if (bctbx_connect(sock,dest,destlen)==-1){
//if (connect(sock,dest,destlen)==-1){
ret = -get_socket_error();
belle_sip_error("belle_sip_get_src_addr_for: connect() failed: %s",belle_sip_get_socket_error_string_from_code(-ret));
belle_sip_error("belle_sip_get_src_addr_for: bctbx_connect() failed: %s",belle_sip_get_socket_error_string_from_code(-ret));
goto fail;
}
if (bctbx_getsockname(sock,src,srclen)==-1){
ret = -get_socket_error();
belle_sip_error("belle_sip_get_src_addr_for: getsockname() failed: %s",belle_sip_get_socket_error_string_from_code(-ret));
belle_sip_error("belle_sip_get_src_addr_for: bctbx_getsockname() failed: %s",belle_sip_get_socket_error_string_from_code(-ret));
goto fail;
}
......
......@@ -257,7 +257,7 @@ int belle_sip_socket_enable_dual_stack(belle_sip_socket_t sock){
int value=0;
int err=bctbx_setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&value, sizeof(value));
if (err==-1){
belle_sip_warning("belle_sip_socket_enable_dual_stack: setsockopt(IPV6_ONLY) failed: %s",belle_sip_get_socket_error_string());
belle_sip_warning("belle_sip_socket_enable_dual_stack: bctbx_setsockopt(IPV6_ONLY) failed: %s",belle_sip_get_socket_error_string());
}
return err;
}
......@@ -133,7 +133,7 @@ int stream_channel_connect(belle_sip_stream_channel_t *obj, const struct addrinf
err=bctbx_setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char*)&tmp,sizeof(tmp));
if (err!=0){
belle_sip_error("setsockopt TCP_NODELAY failed: [%s]",belle_sip_get_socket_error_string());
belle_sip_error("bctbx_setsockopt TCP_NODELAY failed: [%s]",belle_sip_get_socket_error_string());
}
belle_sip_socket_set_nonblocking(sock);
if (ai->ai_family==AF_INET6){
......@@ -269,8 +269,8 @@ belle_sip_channel_t * belle_sip_stream_channel_new_child(belle_sip_stack_t *stac
set_tcp_nodelay(sock);
if (getsockname(sock,(struct sockaddr*)&localaddr,&local_len)==-1){
belle_sip_error("getsockname() failed: %s",belle_sip_get_socket_error_string());
if (bctbx_getsockname(sock,(struct sockaddr*)&localaddr,&local_len)==-1){
belle_sip_error("bctbx_getsockname() failed: %s",belle_sip_get_socket_error_string());
return NULL;
}
......
......@@ -117,7 +117,7 @@ static belle_sip_socket_t create_server_socket(const char *addr, int * port, int
*port=atoi(portnum);
belle_sip_message("Random TCP port is %i",*port);
}else belle_sip_error("TCP bind failed, getnameinfo(): %s",gai_strerror(err));
}else belle_sip_error("TCP bind failed, getsockname(): %s",belle_sip_get_socket_error_string());
}else belle_sip_error("TCP bind failed, bctbx_getsockname(): %s",belle_sip_get_socket_error_string());
}
err=listen(sock,64);
......
......@@ -117,7 +117,7 @@ static belle_sip_socket_t create_udp_socket(const char *addr, int *port, int *fa
*port=atoi(portnum);
belle_sip_message("Random UDP port is %i",*port);
}else belle_sip_error("udp bind failed, getnameinfo(): %s",gai_strerror(err));
}else belle_sip_error("udp bind failed, getsockname(): %s",belle_sip_get_socket_error_string());
}else belle_sip_error("udp bind failed, bctbx_getsockname(): %s",belle_sip_get_socket_error_string());
}
return sock;
}
......
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