Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c0e61687
Commit
c0e61687
authored
Mar 01, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listen: fix windows specific code
During the listen_add_host() API transition, the windows code wasn't tested, and several removed arguments are still in use there.
parent
8c3df4cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
listen.c
src/listen.c
+8
-5
No files found.
src/listen.c
View file @
c0e61687
...
...
@@ -295,18 +295,21 @@ listen_add_host(const char *hostname, unsigned port, GError **error)
#else
/* WIN32 */
const
struct
hostent
*
he
;
g_debug
(
"binding to address for %s"
,
param
->
valu
e
);
g_debug
(
"binding to address for %s"
,
hostnam
e
);
he
=
gethostbyname
(
param
->
valu
e
);
he
=
gethostbyname
(
hostnam
e
);
if
(
he
==
NULL
)
{
g_set_error
(
error
,
listen_quark
(),
0
,
"Failed to look up host
\"
%s
\"
"
,
hostname
);
return
false
;
}
if
(
he
->
h_addrtype
!=
AF_INET
)
g_error
(
"IPv4 address expected for host
\"
%s
\"
at line %i"
,
param
->
value
,
param
->
line
);
if
(
he
->
h_addrtype
!=
AF_INET
)
{
g_set_error
(
error
,
listen_quark
(),
0
,
"IPv4 address expected for host
\"
%s
\"
"
,
hostname
);
return
false
;
}
return
listen_add_address
(
AF_INET
,
he
->
h_addr
,
he
->
h_length
,
error
);
...
...
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