dont bail in net_interface_config_get if address query fails (e.g. vmnic1)

This commit is contained in:
Doug MacEachern 2005-11-17 02:50:37 +00:00
parent 90c1298705
commit 05624b41cb
3 changed files with 5 additions and 9 deletions

View File

@ -67,6 +67,7 @@ JNI_OnLoad(JavaVM *vm, void *reserved)
"log=dmalloc-sigar.log";
}
dmalloc_debug_setup(options);
fprintf(stderr, "DMALLOC_OPTIONS=%s\n", options);
#endif
return JNI_VERSION_1_2;
}

View File

@ -10,12 +10,12 @@ if (@ARGV) {
}
else {
my(@argv);
my $nargs = 126;
my $arglen = 256;
my $nargs = 26;
my $arglen = 4256;
my $arg = 'a';
for (my $i=0; $i<$nargs; $i++) {
push @argv, $arg++ x $arglen;
}
exec $^X, $0, @argv;
print "$^X $0\n";
exec $^X, $0, @argv or die $!;
}

View File

@ -1182,11 +1182,6 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
if (!ioctl(sock, SIOCGIFADDR, &ifr)) {
ifconfig->address = ifr_s_addr(ifr);
}
else {
/* if this one failed, so will everything else */
close(sock);
return errno;
}
if (!ioctl(sock, SIOCGIFNETMASK, &ifr)) {
ifconfig->netmask = ifr_s_addr(ifr);