mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:15:41 +00:00
do not cuase crash in dhcp when no networkcard is found
svn path=/trunk/; revision=22200
This commit is contained in:
parent
dd6d911c37
commit
c92839403a
1 changed files with 10 additions and 1 deletions
|
@ -98,10 +98,19 @@ void *dmalloc( int size, char *name ) { return malloc( size ); }
|
||||||
|
|
||||||
int read_client_conf(void) {
|
int read_client_conf(void) {
|
||||||
/* What a strage dance */
|
/* What a strage dance */
|
||||||
struct client_config *config = ifi->client->config;
|
struct client_config *config;
|
||||||
char ComputerName [MAX_COMPUTERNAME_LENGTH + 1];
|
char ComputerName [MAX_COMPUTERNAME_LENGTH + 1];
|
||||||
DWORD ComputerNameSize = sizeof ComputerName / sizeof ComputerName[0];
|
DWORD ComputerNameSize = sizeof ComputerName / sizeof ComputerName[0];
|
||||||
|
|
||||||
|
if ((ifi!= NULL) && (ifi->client->config != NULL))
|
||||||
|
config = ifi->client->config;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
warn("util.c read_client_conf poorly implemented!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GetComputerName(ComputerName, & ComputerNameSize);
|
GetComputerName(ComputerName, & ComputerNameSize);
|
||||||
/* This never gets freed since it's only called once */
|
/* This never gets freed since it's only called once */
|
||||||
LPSTR lpCompName =
|
LPSTR lpCompName =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue