Explorar o código

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

Andrei Pelinescu-Onciul %!s(int64=21) %!d(string=hai) anos
pai
achega
b55ecd11d8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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){