Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f21f5965
Commit
f21f5965
authored
Oct 11, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PySocket_Err() instead of PyErr_SetFromErrno().
The former does the right thing on Windows, the latter does not.
parent
d35ee901
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Modules/socketmodule.c
Modules/socketmodule.c
+2
-3
No files found.
Modules/socketmodule.c
View file @
f21f5965
...
...
@@ -850,7 +850,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
strncpy
(
ifr
.
ifr_name
,
interfaceName
,
sizeof
(
ifr
.
ifr_name
));
ifr
.
ifr_name
[(
sizeof
(
ifr
.
ifr_name
))
-
1
]
=
'\0'
;
if
(
ioctl
(
s
->
sock_fd
,
SIOCGIFINDEX
,
&
ifr
)
<
0
)
{
Py
Err_SetFromErrno
(
PySocket_Error
);
Py
Socket_Err
(
);
return
0
;
}
addr
=
&
(
s
->
sock_addr
.
ll
);
...
...
@@ -2530,8 +2530,7 @@ PySSL_SetError(SSL *ssl, int ret)
/* the underlying BIO reported an I/O error */
Py_DECREF
(
v
);
Py_DECREF
(
n
);
PyErr_SetFromErrno
(
PyExc_IOError
);
return
NULL
;
return
PySocket_Err
();
}
else
{
/* XXX Protected by global interpreter lock */
errstr
=
ERR_error_string
(
e
,
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