Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
7632a5e4
Commit
7632a5e4
authored
7 years ago
by
ruslanvaliullin
Committed by
Cesanta Bot
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ignoring DhcpNameServer
PUBLISHED_FROM=73d6767e4aaa7249eeb5d76f9e7160be041292ca
parent
7f20c41d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
mongoose.c
mongoose.c
+6
-7
No files found.
mongoose.c
View file @
7632a5e4
...
@@ -10952,10 +10952,12 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
...
@@ -10952,10 +10952,12 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
break
;
break
;
}
}
if
(
RegOpenKeyExW
(
hKey
,
subkey
,
0
,
KEY_READ
,
&
hSub
)
==
ERROR_SUCCESS
&&
if
(
RegOpenKeyExW
(
hKey
,
subkey
,
0
,
KEY_READ
,
&
hSub
)
==
ERROR_SUCCESS
&&
(
RegQueryValueExW
(
hSub
,
L"NameServer"
,
0
,
&
type
,
(
void
*
)
value
,
((
RegQueryValueExW
(
hSub
,
L"NameServer"
,
0
,
&
type
,
(
void
*
)
value
,
&
len
)
==
ERROR_SUCCESS
||
&
len
)
==
ERROR_SUCCESS
&&
RegQueryValueExW
(
hSub
,
L"DhcpNameServer"
,
0
,
&
type
,
(
void
*
)
value
,
value
[
0
]
!=
'\0'
)
||
&
len
)
==
ERROR_SUCCESS
))
{
(
RegQueryValueExW
(
hSub
,
L"DhcpNameServer"
,
0
,
&
type
,
(
void
*
)
value
,
&
len
)
==
ERROR_SUCCESS
&&
value
[
0
]
!=
'\0'
)))
{
/*
/*
* See https://github.com/cesanta/mongoose/issues/176
* See https://github.com/cesanta/mongoose/issues/176
* The value taken from the registry can be empty, a single
* The value taken from the registry can be empty, a single
...
@@ -10964,9 +10966,6 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
...
@@ -10964,9 +10966,6 @@ static int mg_get_ip_address_of_nameserver(char *name, size_t name_len) {
* If it's multiple IP addresses, take the first one.
* If it's multiple IP addresses, take the first one.
*/
*/
wchar_t
*
comma
=
wcschr
(
value
,
','
);
wchar_t
*
comma
=
wcschr
(
value
,
','
);
if
(
value
[
0
]
==
'\0'
)
{
continue
;
}
if
(
comma
!=
NULL
)
{
if
(
comma
!=
NULL
)
{
*
comma
=
'\0'
;
*
comma
=
'\0'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment