Przeglądaj źródła

- increased initial interface list probing buffer
(should work better/start faster for hosts with >100 network interfaces)

Andrei Pelinescu-Onciul 21 lat temu
rodzic
commit
b55ecd11d8
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      socket_info.c

+ 1 - 1
socket_info.c

@@ -265,7 +265,7 @@ int add_interfaces(char* if_name, int family, unsigned short port,
 	ret=-1;
 	lastlen=0;
 	ifc.ifc_req=0;
-	for (size=10; ; size*=2){
+	for (size=100; ; size*=2){
 		ifc.ifc_len=size*sizeof(struct ifreq);
 		ifc.ifc_req=(struct ifreq*) pkg_malloc(size*sizeof(struct ifreq));
 		if (ifc.ifc_req==0){