Browse code

core: interface names in socket list port fix

Due to an unfortunate typo, the port number was always set to 5060
for a listen address containing an interface name (e.g.
-l eth0:5070 or -l udp:eth1:5062).

Andrei Pelinescu-Onciul authored on 15/07/2009 00:12:03
Showing 1 changed files
... ...
@@ -870,7 +870,7 @@ static int addr_info_to_si_lst(struct addr_info* ai_lst, unsigned short port,
870 870
 	struct addr_info* ail;
871 871
 	
872 872
 	for (ail=ai_lst; ail; ail=ail->next){
873
-		if(new_sock2list(ail->name.s, 0, port_no, proto, ail->flags | flags,
873
+		if(new_sock2list(ail->name.s, 0, port, proto, ail->flags | flags,
874 874
 							list)==0)
875 875
 			return -1;
876 876
 	}
... ...
@@ -892,7 +892,7 @@ static int addr_info_to_si_lst_after(struct addr_info* ai_lst,
892 892
 	struct socket_info* new_si;
893 893
 	
894 894
 	for (ail=ai_lst; ail; ail=ail->next){
895
-		if((new_si=new_sock2list_after(ail->name.s, 0, port_no, proto,
895
+		if((new_si=new_sock2list_after(ail->name.s, 0, port, proto,
896 896
 								ail->flags | flags, el))==0)
897 897
 			return -1;
898 898
 		el=new_si;