Skip to content

Commit

Permalink
net/trans: remove useless interface detection code
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Nov 29, 2017
1 parent 27de191 commit 4833fb8
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions net/trans.c
Expand Up @@ -193,45 +193,6 @@ int fix_all_socket_lists(void)
int found = 0;
static char buf[PROTO_NAME_MAX_SIZE /* currently we shouldn't hardcode that much */];
char *p;
#if 0
/* TODO: decide what to do with this */
struct utsname myname;

if ((udp_listen==0)
&& (tcp_listen==0)
&& (tls_listen==0)
&& (sctp_listen==0)
){
/* get all listening ipv4 interfaces */
if (add_interfaces(0, AF_INET, 0, PROTO_UDP, &udp_listen)==0){
/* if ok, try to add the others too */
if (!tcp_disable){
if (add_interfaces(0, AF_INET, 0, PROTO_TCP, &tcp_listen)!=0)
goto error;
if (!tls_disable){
if (add_interfaces(0, AF_INET, 0, PROTO_TLS,
&tls_listen)!=0)
goto error;
}
}
if (!sctp_disable){
if (add_interfaces(0, AF_INET, 0, PROTO_SCTP, &sctp_listen)!=0)
goto error;
}
}else{
/* if error fall back to get hostname */
/* get our address, only the first one */
if (uname (&myname) <0){
LM_ERR("cannot determine hostname, try -l address\n");
goto error;
}
if (add_listen_iface(myname.nodename, 0, 0, 0, 0, 0, 0)!=0){
LM_ERR("add_listen_iface failed \n");
goto error;
}
}
}
#endif

for (i = PROTO_FIRST; i < PROTO_LAST; i++) {
if (protos[i].id != PROTO_NONE) {
Expand Down

0 comments on commit 4833fb8

Please sign in to comment.