Skip to content

Commit

Permalink
socket-util: Remove get_socket_error().
Browse files Browse the repository at this point in the history
It has no remaining users.

Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Ethan Jackson <[email protected]>
  • Loading branch information
blp committed Nov 20, 2012
1 parent d6cedfd commit 24f974c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
13 changes: 0 additions & 13 deletions lib/socket-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion lib/socket-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions python/ovs/socket_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24f974c

Please sign in to comment.