Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
01380b05
Commit
01380b05
authored
17 years ago
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ws2_32: Fix flags conversion in getnameinfo() function.
parent
d701ee22
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ws2_32/socket.c
+24
-2
24 additions, 2 deletions
dlls/ws2_32/socket.c
with
24 additions
and
2 deletions
dlls/ws2_32/socket.c
+
24
−
2
View file @
01380b05
...
...
@@ -327,6 +327,15 @@ static const int ws_aiflag_map[][2] =
*/
};
static
const
int
ws_niflag_map
[][
2
]
=
{
MAP_OPTION
(
NI_NOFQDN
),
MAP_OPTION
(
NI_NUMERICHOST
),
MAP_OPTION
(
NI_NAMEREQD
),
MAP_OPTION
(
NI_NUMERICSERV
),
MAP_OPTION
(
NI_DGRAM
),
};
static
const
int
ws_eai_map
[][
2
]
=
{
MAP_OPTION
(
EAI_AGAIN
),
...
...
@@ -3327,7 +3336,7 @@ void WINAPI WS_freeaddrinfo(struct WS_addrinfo *res)
}
}
/* helper functions for getaddrinfo() */
/* helper functions for getaddrinfo()
/getnameinfo()
*/
static
int
convert_aiflag_w2u
(
int
winflags
)
{
int
i
,
unixflags
=
0
;
...
...
@@ -3341,6 +3350,19 @@ static int convert_aiflag_w2u(int winflags) {
return
unixflags
;
}
static
int
convert_niflag_w2u
(
int
winflags
)
{
int
i
,
unixflags
=
0
;
for
(
i
=
0
;
i
<
sizeof
(
ws_niflag_map
)
/
sizeof
(
ws_niflag_map
[
0
]);
i
++
)
if
(
ws_niflag_map
[
i
][
0
]
&
winflags
)
{
unixflags
|=
ws_niflag_map
[
i
][
1
];
winflags
&=
~
ws_niflag_map
[
i
][
0
];
}
if
(
winflags
)
FIXME
(
"Unhandled windows NI_xxx flags %x
\n
"
,
winflags
);
return
unixflags
;
}
static
int
convert_aiflag_u2w
(
int
unixflags
)
{
int
i
,
winflags
=
0
;
...
...
@@ -3498,7 +3520,7 @@ int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host,
WSASetLastError
(
WSAEFAULT
);
return
WSA_NOT_ENOUGH_MEMORY
;
}
ret
=
getnameinfo
(
&
sa_u
.
addr
,
size
,
host
,
hostlen
,
serv
,
servlen
,
convert_
a
iflag_w2u
(
flags
));
ret
=
getnameinfo
(
&
sa_u
.
addr
,
size
,
host
,
hostlen
,
serv
,
servlen
,
convert_
n
iflag_w2u
(
flags
));
return
convert_eai_u2w
(
ret
);
#else
FIXME
(
"getnameinfo() failed, not found during buildtime.
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment