Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
wine
wine-cw
Commits
e63fdf10
Commit
e63fdf10
authored
Mar 19, 2000
by
Lars Heete
Committed by
Alexandre Julliard
Mar 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected handling of proto==NULL in WINSOCK_getservbyname and
WINSOCK_getservbyport.
parent
1dac57f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
socket.c
dlls/winsock/socket.c
+11
-8
No files found.
dlls/winsock/socket.c
View file @
e63fdf10
...
...
@@ -1996,17 +1996,20 @@ struct WIN_servent* __ws_getservbyname(const char *name, const char *proto, int
struct
servent
*
serv
;
int
i
=
wsi_strtolo
(
pwsi
,
name
,
proto
);
if
(
i
)
if
(
(
serv
=
getservbyname
(
pwsi
->
buffer
,
pwsi
->
buffer
+
i
))
!=
NULL
)
if
(
i
)
{
serv
=
getservbyname
(
pwsi
->
buffer
,
proto
?
(
pwsi
->
buffer
+
i
)
:
NULL
);
if
(
serv
!=
NULL
)
if
(
WS_dup_se
(
pwsi
,
serv
,
dup_flag
)
)
return
(
struct
WIN_servent
*
)(
pwsi
->
se
);
else
SetLastError
(
WSAENOBUFS
);
else
{
MESSAGE
(
"service %s protocol %s not found; maybe you have add "
"this to /etc/services
\n
"
,
debugstr_a
(
pwsi
->
buffer
),
debugstr_a
(
pwsi
->
buffer
+
i
)
);
proto
?
debugstr_a
(
pwsi
->
buffer
+
i
)
:
"*"
);
SetLastError
(
WSANO_DATA
);
}
}
else
SetLastError
(
WSAENOBUFS
);
}
else
SetLastError
(
WSANOTINITIALISED
);
return
NULL
;
...
...
@@ -2039,19 +2042,19 @@ static struct WIN_servent* __ws_getservbyport(int port, const char* proto, int d
if
(
pwsi
)
{
struct
servent
*
serv
;
int
i
=
wsi_strtolo
(
pwsi
,
proto
,
NULL
);
if
(
i
)
if
(
(
serv
=
getservbyport
(
port
,
pwsi
->
buffer
))
!=
NULL
)
if
(
!
proto
||
wsi_strtolo
(
pwsi
,
proto
,
NULL
))
{
if
(
(
serv
=
getservbyport
(
port
,
(
proto
)
?
pwsi
->
buffer
:
NULL
))
!=
NULL
)
{
if
(
WS_dup_se
(
pwsi
,
serv
,
dup_flag
)
)
return
(
struct
WIN_servent
*
)(
pwsi
->
se
);
else
SetLastError
(
WSAENOBUFS
);
}
else
{
MESSAGE
(
"service on port %d protocol %s not found; maybe you have "
"add this to /etc/services
\n
"
,
ntohl
(
port
),
debugstr_a
(
pwsi
->
buffer
)
);
proto
?
debugstr_a
(
pwsi
->
buffer
)
:
"*"
);
SetLastError
(
WSANO_DATA
);
}
}
else
SetLastError
(
WSAENOBUFS
);
}
else
SetLastError
(
WSANOTINITIALISED
);
return
NULL
;
...
...
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