Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ce77ea90
Commit
ce77ea90
authored
Apr 06, 2000
by
Rein Klazes
Committed by
Alexandre Julliard
Apr 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected error handling for ws_getprotobyname/number.
Made the Async error returns the same as the normal functions.
parent
61f572a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
10 deletions
+38
-10
async.c
dlls/winsock/async.c
+22
-3
socket.c
dlls/winsock/socket.c
+16
-7
No files found.
dlls/winsock/async.c
View file @
ce77ea90
...
...
@@ -90,6 +90,11 @@
DEFAULT_DEBUG_CHANNEL
(
winsock
)
/* protoptypes of some functions in socket.c
*/
UINT16
wsaErrno
(
void
);
UINT16
wsaHerrno
(
void
);
/* ----------------------------------- helper functions - */
static
int
list_size
(
char
**
l
,
int
item_size
)
...
...
@@ -308,7 +313,7 @@ static DWORD WINAPI _async_queryfun(LPVOID arg) {
size
=
-
size
;
}
}
else
{
fail
=
WSAENOBUFS
;
fail
=
((
h_errno
<
0
)
?
wsaErrno
()
:
wsaHerrno
())
;
}
}
break
;
...
...
@@ -325,7 +330,13 @@ static DWORD WINAPI _async_queryfun(LPVOID arg) {
size
=
-
size
;
}
}
else
{
fail
=
WSAENOBUFS
;
if
(
aq
->
flags
&
AQ_NAME
)
MESSAGE
(
"protocol %s not found; You might want to add "
"this to /etc/protocols
\n
"
,
debugstr_a
(
aq
->
proto_name
)
);
else
MESSAGE
(
"protocol number %d not found; You might want to add "
"this to /etc/protocols
\n
"
,
aq
->
proto_number
);
fail
=
WSANO_DATA
;
}
}
break
;
...
...
@@ -342,7 +353,15 @@ static DWORD WINAPI _async_queryfun(LPVOID arg) {
size
=
-
size
;
}
}
else
{
fail
=
WSAENOBUFS
;
if
(
aq
->
flags
&
AQ_NAME
)
MESSAGE
(
"service %s protocol %s not found; You might want to add "
"this to /etc/services
\n
"
,
debugstr_a
(
aq
->
serv_name
)
,
aq
->
serv_proto
?
debugstr_a
(
aq
->
serv_proto
)
:
"*"
);
else
MESSAGE
(
"service on port %d protocol %s not found; You might want to add "
"this to /etc/services
\n
"
,
aq
->
serv_port
,
aq
->
serv_proto
?
debugstr_a
(
aq
->
serv_proto
)
:
"*"
);
fail
=
WSANO_DATA
;
}
}
break
;
...
...
dlls/winsock/socket.c
View file @
ce77ea90
...
...
@@ -1964,8 +1964,12 @@ static struct WIN_protoent* __ws_getprotobyname(const char *name, int dup_flag)
if
(
WS_dup_pe
(
pwsi
,
proto
,
dup_flag
)
)
return
(
struct
WIN_protoent
*
)(
pwsi
->
pe
);
else
SetLastError
(
WSAENOBUFS
);
else
SetLastError
((
h_errno
<
0
)
?
wsaErrno
()
:
wsaHerrno
());
}
else
{
MESSAGE
(
"protocol %s not found; You might want to add "
"this to /etc/protocols
\n
"
,
debugstr_a
(
name
)
);
SetLastError
(
WSANO_DATA
);
}
}
else
SetLastError
(
WSANOTINITIALISED
);
return
NULL
;
}
...
...
@@ -1998,8 +2002,12 @@ static struct WIN_protoent* __ws_getprotobynumber(int number, int dup_flag)
if
(
WS_dup_pe
(
pwsi
,
proto
,
dup_flag
)
)
return
(
struct
WIN_protoent
*
)(
pwsi
->
pe
);
else
SetLastError
(
WSAENOBUFS
);
else
SetLastError
(
WSANO_DATA
);
}
else
{
MESSAGE
(
"protocol number %d not found; You might want to add "
"this to /etc/protocols
\n
"
,
number
);
SetLastError
(
WSANO_DATA
);
}
}
else
SetLastError
(
WSANOTINITIALISED
);
return
NULL
;
}
...
...
@@ -2038,7 +2046,7 @@ struct WIN_servent* __ws_getservbyname(const char *name, const char *proto, int
return
(
struct
WIN_servent
*
)(
pwsi
->
se
);
else
SetLastError
(
WSAENOBUFS
);
else
{
MESSAGE
(
"service %s protocol %s not found;
maybe you have
add "
MESSAGE
(
"service %s protocol %s not found;
You might want to
add "
"this to /etc/services
\n
"
,
debugstr_a
(
pwsi
->
buffer
),
proto
?
debugstr_a
(
pwsi
->
buffer
+
i
)
:
"*"
);
SetLastError
(
WSANO_DATA
);
...
...
@@ -2083,7 +2091,7 @@ static struct WIN_servent* __ws_getservbyport(int port, const char* proto, int d
else
SetLastError
(
WSAENOBUFS
);
}
else
{
MESSAGE
(
"service on port %d protocol %s not found;
maybe you have
"
MESSAGE
(
"service on port %d protocol %s not found;
You might want to add
"
"add this to /etc/services
\n
"
,
ntohl
(
port
),
proto
?
debugstr_a
(
pwsi
->
buffer
)
:
"*"
);
SetLastError
(
WSANO_DATA
);
...
...
@@ -2498,7 +2506,8 @@ DWORD WINAPI WsControl(DWORD protocoll,DWORD action,
}
return
FALSE
;
}
/*********************************************************
/***********************************************************************
* WS_s_perror WSOCK32.1108
*/
void
WINAPI
WS_s_perror
(
LPCSTR
message
)
...
...
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