|
@@ -555,16 +555,14 @@ retry:
|
|
if (list==0) /* disabled or unknown protocol */
|
|
if (list==0) /* disabled or unknown protocol */
|
|
continue;
|
|
continue;
|
|
for (si=*list; si; si=si->next){
|
|
for (si=*list; si; si=si->next){
|
|
- DBG("grep_sock_info - checking if host==us: %d==%d &&"
|
|
|
|
- " [%.*s] == [%.*s]\n",
|
|
|
|
|
|
+ LM_DBG("checking if host==us: %d==%d && [%.*s] == [%.*s]\n",
|
|
hname.len,
|
|
hname.len,
|
|
si->name.len,
|
|
si->name.len,
|
|
hname.len, hname.s,
|
|
hname.len, hname.s,
|
|
si->name.len, si->name.s
|
|
si->name.len, si->name.s
|
|
);
|
|
);
|
|
if (port) {
|
|
if (port) {
|
|
- DBG("grep_sock_info - checking if port %d (advertise %d)"
|
|
|
|
- " matches port %d\n",
|
|
|
|
|
|
+ LM_DBG("checking if port %d (advertise %d) matches port %d\n",
|
|
si->port_no, si->useinfo.port_no, port);
|
|
si->port_no, si->useinfo.port_no, port);
|
|
if (si->port_no!=port && si->useinfo.port_no!=port) {
|
|
if (si->port_no!=port && si->useinfo.port_no!=port) {
|
|
continue;
|
|
continue;
|
|
@@ -575,7 +573,7 @@ retry:
|
|
goto found;
|
|
goto found;
|
|
if(si->useinfo.name.s!=NULL)
|
|
if(si->useinfo.name.s!=NULL)
|
|
{
|
|
{
|
|
- DBG("grep_sock_info - checking advertise if host==us:"
|
|
|
|
|
|
+ LM_DBG("checking advertise if host==us:"
|
|
" %d==%d && [%.*s] == [%.*s]\n",
|
|
" %d==%d && [%.*s] == [%.*s]\n",
|
|
hname.len,
|
|
hname.len,
|
|
si->useinfo.name.len,
|
|
si->useinfo.name.len,
|
|
@@ -632,8 +630,7 @@ struct socket_info* grep_sock_info_by_port(unsigned short port,
|
|
continue;
|
|
continue;
|
|
|
|
|
|
for (si=*list; si; si=si->next){
|
|
for (si=*list; si; si=si->next){
|
|
- DBG("grep_sock_info_by_port - checking if port %d matches"
|
|
|
|
- " port %d\n", si->port_no, port);
|
|
|
|
|
|
+ LM_DBG("checking if port %d matches port %d\n", si->port_no, port);
|
|
if (si->port_no==port) {
|
|
if (si->port_no==port) {
|
|
goto found;
|
|
goto found;
|
|
}
|
|
}
|
|
@@ -1160,9 +1157,10 @@ int add_interfaces_via_netlink(char* if_name, int family, unsigned short port,
|
|
//if(! (ifaces[i].flags & IFF_UP) ) continue;
|
|
//if(! (ifaces[i].flags & IFF_UP) ) continue;
|
|
|
|
|
|
for(tmp = ifaces[i].addresses; tmp; tmp = tmp->next){
|
|
for(tmp = ifaces[i].addresses; tmp; tmp = tmp->next){
|
|
- LM_DBG("\t in add_iface_via_netlink Name %s Address %s\n", ifaces[i].name, tmp->addr);
|
|
|
|
- /* match family */
|
|
|
|
- if (family == tmp->family){
|
|
|
|
|
|
+ LM_DBG("in add_iface_via_netlink Name %s Address %s\n",
|
|
|
|
+ ifaces[i].name, tmp->addr);
|
|
|
|
+ /* match family */
|
|
|
|
+ if (family == tmp->family){
|
|
/* check if loopback */
|
|
/* check if loopback */
|
|
if (ifaces[i].flags & IFF_LOOPBACK){
|
|
if (ifaces[i].flags & IFF_LOOPBACK){
|
|
LM_DBG("INTERFACE %s is loopback", ifaces[i].name);
|
|
LM_DBG("INTERFACE %s is loopback", ifaces[i].name);
|
|
@@ -1542,7 +1540,7 @@ static int fix_socket_list(struct socket_info **list, int* type_flags)
|
|
}
|
|
}
|
|
/* get ips & fill the port numbers*/
|
|
/* get ips & fill the port numbers*/
|
|
#ifdef EXTRA_DEBUG
|
|
#ifdef EXTRA_DEBUG
|
|
- DBG("Listening on \n");
|
|
|
|
|
|
+ LM_DBG("Listening on\n");
|
|
#endif
|
|
#endif
|
|
for (si=*list;si;si=si->next){
|
|
for (si=*list;si;si=si->next){
|
|
/* fix port number, port_no should be !=0 here */
|
|
/* fix port number, port_no should be !=0 here */
|