mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 07:45:30 +00:00
socket-util: Remove get_socket_error().
It has no remaining users. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
@@ -205,19 +205,6 @@ lookup_hostname(const char *host_name, struct in_addr *addr)
|
||||
: EINVAL);
|
||||
}
|
||||
|
||||
/* Returns the error condition associated with socket 'fd' and resets the
|
||||
* socket's error status. */
|
||||
int
|
||||
get_socket_error(int fd)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (getsockopt_int(fd, SOL_SOCKET, SO_ERROR, "SO_ERROR", &error)) {
|
||||
error = errno;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
int
|
||||
check_connection_completion(int fd)
|
||||
{
|
||||
|
@@ -36,7 +36,6 @@ int lookup_ipv6(const char *host_name, struct in6_addr *address);
|
||||
|
||||
int lookup_hostname(const char *host_name, struct in_addr *);
|
||||
|
||||
int get_socket_error(int sock);
|
||||
int get_socket_rcvbuf(int sock);
|
||||
int check_connection_completion(int fd);
|
||||
int drain_rcvbuf(int fd);
|
||||
|
@@ -133,12 +133,6 @@ def inet_open_active(style, target, default_port, dscp):
|
||||
return get_exception_errno(e), None
|
||||
|
||||
|
||||
def get_socket_error(sock):
|
||||
"""Returns the errno value associated with 'socket' (0 if no error) and
|
||||
resets the socket's error status."""
|
||||
return sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
|
||||
|
||||
|
||||
def get_exception_errno(e):
|
||||
"""A lot of methods on Python socket objects raise socket.error, but that
|
||||
exception is documented as having two completely different forms of
|
||||
|
Reference in New Issue
Block a user