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;
|
int this_ifnum = 0;
|
||||||
|
|
||||||
while(ifptr) {
|
while(ifptr) {
|
||||||
if(ifnum >= 0 && this_ifnum++ != ifnum) {
|
|
||||||
ifptr = ifptr->Next;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct reg_value rv;
|
struct reg_value rv;
|
||||||
int got_rv = 0;
|
int got_rv = 0;
|
||||||
|
|
||||||
@ -78,6 +73,11 @@ struct ipx_interface *get_interfaces(int ifnum) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ifnum >= 0 && this_ifnum++ != ifnum) {
|
||||||
|
ifptr = ifptr->Next;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
struct ipx_interface *nnic = malloc(sizeof(struct ipx_interface));
|
struct ipx_interface *nnic = malloc(sizeof(struct ipx_interface));
|
||||||
if(!nnic) {
|
if(!nnic) {
|
||||||
log_printf("Out of memory! (Tried to allocate %u bytes)", (unsigned int)sizeof(struct ipx_interface));
|
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