mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Fixed bug: Requesting single interface when disabled interfaces are present from get_interfaces.
This commit is contained in:
parent
e82ffa87e2
commit
b3db46de40
@ -57,11 +57,6 @@ struct ipx_interface *get_interfaces(int ifnum) {
|
||||
int this_ifnum = 0;
|
||||
|
||||
while(ifptr) {
|
||||
if(ifnum >= 0 && this_ifnum++ != ifnum) {
|
||||
ifptr = ifptr->Next;
|
||||
continue;
|
||||
}
|
||||
|
||||
struct reg_value rv;
|
||||
int got_rv = 0;
|
||||
|
||||
@ -78,6 +73,11 @@ struct ipx_interface *get_interfaces(int ifnum) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(ifnum >= 0 && this_ifnum++ != ifnum) {
|
||||
ifptr = ifptr->Next;
|
||||
continue;
|
||||
}
|
||||
|
||||
struct ipx_interface *nnic = malloc(sizeof(struct ipx_interface));
|
||||
if(!nnic) {
|
||||
log_printf("Out of memory! (Tried to allocate %u bytes)", (unsigned int)sizeof(struct ipx_interface));
|
||||
|
Loading…
x
Reference in New Issue
Block a user