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
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
Zsolt Vadász
wine
Commits
e9b2f3c0
Commit
e9b2f3c0
authored
24 years ago
by
Rein Klazes
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Convert service and protocol names to lowercase before calling
getservby{name|port} and getprotoby{name|port}.
parent
f46e1d8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winsock/async.c
+40
-2
40 additions, 2 deletions
dlls/winsock/async.c
with
40 additions
and
2 deletions
dlls/winsock/async.c
+
40
−
2
View file @
e9b2f3c0
...
...
@@ -17,6 +17,8 @@
* (not sure why)
* - This implementation did ignore the "NOTE:" section above (since the
* whole stuff did not work anyway to other changes).
* - (Rein Klazes) Some structures returned (eg servent) are NOT correct in
* win32. The packing should be at 4 byte bounds. Same problem in socket.c
*/
#include
"config.h"
...
...
@@ -280,8 +282,10 @@ typedef struct _async_query {
#define AQ_GETSERV 2
#define AQ_GETMASK 3
int
qt
;
char
xbuf
[
1
];
}
async_query
;
/****************************************************************************
* The async query function.
*
...
...
@@ -381,10 +385,44 @@ static DWORD WINAPI _async_queryfun(LPVOID arg) {
static
HANDLE16
__WSAsyncDBQuery
(
HWND
hWnd
,
UINT
uMsg
,
INT
int1
,
LPCSTR
ptr1
,
INT
int2
,
LPCSTR
ptr2
,
void
*
sbuf
,
INT
sbuflen
,
UINT
flags
)
{
async_query
*
aq
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_query
));
)
{
async_query
*
aq
;
HANDLE
hthread
;
int
xbuflen
=
0
;
/* allocate buffer to copy protocol- and service name to */
/* note: this is done in the calling thread so we can return */
/* a decent error code if the Alloc fails */
if
(
flags
&
(
AQ_GETPROTO
|
AQ_GETSERV
))
{
if
(
ptr1
)
xbuflen
+=
strlen
(
ptr1
)
+
1
;
if
(
ptr2
)
xbuflen
+=
strlen
(
ptr2
)
+
1
;
}
aq
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
async_query
)
+
xbuflen
);
if
(
!
aq
)
{
SetLastError
(
WSAEWOULDBLOCK
);
/* insufficient resources */
return
0
;
}
/* convert protocol- and service names to lower case */
if
(
flags
&
(
AQ_GETPROTO
|
AQ_GETSERV
))
{
const
char
*
pfrom
;
char
*
pto
=
aq
->
xbuf
;
if
(
ptr1
)
{
pfrom
=
ptr1
;
ptr1
=
pto
;
do
*
pto
++
=
tolower
(
*
pfrom
);
while
(
*
pfrom
++
);
}
if
(
ptr2
)
{
pfrom
=
ptr2
;
ptr2
=
pto
;
do
*
pto
++
=
tolower
(
*
pfrom
);
while
(
*
pfrom
++
);
}
}
aq
->
hWnd
=
hWnd
;
aq
->
uMsg
=
uMsg
;
aq
->
int1
=
int1
;
...
...
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