mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Stop trying to find more adapters if it failed to avoid spamming the debug log
- Should fix buildbot test 2nd stage svn path=/trunk/; revision=42491
This commit is contained in:
parent
7b56dfa270
commit
c319a3c9bb
3 changed files with 13 additions and 4 deletions
|
@ -229,12 +229,13 @@ InterfaceConnected(MIB_IFROW IfEntry)
|
|||
/*
|
||||
* XXX Figure out the way to bind a specific adapter to a socket.
|
||||
*/
|
||||
void AdapterDiscover() {
|
||||
BOOLEAN AdapterDiscover() {
|
||||
PMIB_IFTABLE Table = (PMIB_IFTABLE) malloc(sizeof(MIB_IFTABLE));
|
||||
DWORD Error, Size = sizeof(MIB_IFTABLE);
|
||||
PDHCP_ADAPTER Adapter = NULL;
|
||||
struct interface_info *ifi = NULL;
|
||||
int i;
|
||||
BOOLEAN ret = TRUE;
|
||||
|
||||
DH_DbgPrint(MID_TRACE,("Getting Adapter List...\n"));
|
||||
|
||||
|
@ -245,7 +246,10 @@ void AdapterDiscover() {
|
|||
Table = (PMIB_IFTABLE) malloc( Size );
|
||||
}
|
||||
|
||||
if( Error != NO_ERROR ) goto term;
|
||||
if( Error != NO_ERROR ) {
|
||||
ret = FALSE;
|
||||
goto term;
|
||||
}
|
||||
|
||||
DH_DbgPrint(MID_TRACE,("Got Adapter List (%d entries)\n", Table->dwNumEntries));
|
||||
|
||||
|
@ -335,6 +339,7 @@ void AdapterDiscover() {
|
|||
|
||||
term:
|
||||
if( Table ) free( Table );
|
||||
return ret;
|
||||
}
|
||||
|
||||
void AdapterStop() {
|
||||
|
|
|
@ -77,7 +77,10 @@ dispatch(void)
|
|||
* a timeout registered, time out the select call then.
|
||||
*/
|
||||
another:
|
||||
AdapterDiscover();
|
||||
if (!AdapterDiscover()) {
|
||||
AdapterStop();
|
||||
break;
|
||||
}
|
||||
|
||||
for (l = protocols, nfds = 0; l; l = l->next)
|
||||
nfds++;
|
||||
|
|
|
@ -73,7 +73,8 @@ typedef DWORD (*PipeSendFunc)( COMM_DHCP_REPLY *Reply );
|
|||
#define srandom srand
|
||||
|
||||
void AdapterInit(VOID);
|
||||
void AdapterDiscover(VOID);
|
||||
BOOLEAN AdapterDiscover(VOID);
|
||||
void AdapterStop(VOID);
|
||||
HANDLE PipeInit(VOID);
|
||||
extern PDHCP_ADAPTER AdapterGetFirst();
|
||||
extern PDHCP_ADAPTER AdapterGetNext(PDHCP_ADAPTER);
|
||||
|
|
Loading…
Reference in a new issue