Skip to content

Commit

Permalink
Remove SbSocketGetLastError
Browse files Browse the repository at this point in the history
Change-Id: I618f5a51d0bb624d4f62191ff999fa7e8768b03c
  • Loading branch information
madhurajayaraman committed Sep 30, 2024
1 parent ca4aefb commit b306e8b
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 70 deletions.
8 changes: 0 additions & 8 deletions net/base/net_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ NET_EXPORT bool IsRequestBlockedError(int error);
NET_EXPORT Error MapSystemError(logging::SystemErrorCode os_error);

#if defined(STARBOARD)
// Map socket error code to Error.
NET_EXPORT Error MapSocketError(SbSocketError error);

// Gets the last socket error as a net error.
static inline Error MapLastSocketError(SbSocket socket) {
return MapSocketError(SbSocketGetLastError(socket));
}

// Gets the last system error as a net error.
static inline Error MapLastSystemError() {
return MapSystemError(SbSystemGetLastError());
Expand Down
1 change: 0 additions & 1 deletion starboard/android/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ static_library("starboard_platform") {
"//starboard/shared/posix/socket_connect.cc",
"//starboard/shared/posix/socket_create.cc",
"//starboard/shared/posix/socket_destroy.cc",
"//starboard/shared/posix/socket_get_last_error.cc",
"//starboard/shared/posix/socket_get_local_address.cc",
"//starboard/shared/posix/socket_internal.cc",
"//starboard/shared/posix/socket_is_ipv6_supported.cc",
Expand Down
4 changes: 0 additions & 4 deletions starboard/common/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ bool Socket::IsPending() {
return GetLastError() == kSbSocketPending;
}

SbSocketError Socket::GetLastError() {
return SbSocketGetLastError(socket_);
}

int Socket::ReceiveFrom(char* out_data,
int data_size,
SbSocketAddress* out_source) {
Expand Down
1 change: 0 additions & 1 deletion starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ ExportedSymbols::ExportedSymbols() {
REGISTER_SYMBOL(SbSocketCreate);
REGISTER_SYMBOL(SbSocketDestroy);
REGISTER_SYMBOL(SbSocketGetInterfaceAddress);
REGISTER_SYMBOL(SbSocketGetLastError);
REGISTER_SYMBOL(SbSocketGetLocalAddress);
REGISTER_SYMBOL(SbSocketIsIpv6Supported);
REGISTER_SYMBOL(SbSocketListen);
Expand Down
1 change: 0 additions & 1 deletion starboard/linux/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ static_library("starboard_platform_sources") {
"//starboard/shared/posix/socket_connect.cc",
"//starboard/shared/posix/socket_create.cc",
"//starboard/shared/posix/socket_destroy.cc",
"//starboard/shared/posix/socket_get_last_error.cc",
"//starboard/shared/posix/socket_get_local_address.cc",
"//starboard/shared/posix/socket_internal.cc",
"//starboard/shared/posix/socket_is_ipv6_supported.cc",
Expand Down
3 changes: 2 additions & 1 deletion starboard/nplb/socket_get_last_error_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// The Sunny Day test is used in several other tests as the way to detect if the
// error is correct, so it is not repeated here.

#if SB_API_VERSION < 17
#include "starboard/common/socket.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand All @@ -29,3 +29,4 @@ TEST(SbSocketGetLastErrorTest, RainyDayInvalidSocket) {
} // namespace
} // namespace nplb
} // namespace starboard
#endif // SB_API_VERSION < 17
1 change: 0 additions & 1 deletion starboard/raspi/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ static_library("starboard_platform_sources") {
"//starboard/shared/posix/socket_connect.cc",
"//starboard/shared/posix/socket_create.cc",
"//starboard/shared/posix/socket_destroy.cc",
"//starboard/shared/posix/socket_get_last_error.cc",
"//starboard/shared/posix/socket_get_local_address.cc",
"//starboard/shared/posix/socket_internal.cc",
"//starboard/shared/posix/socket_is_ipv6_supported.cc",
Expand Down
25 changes: 0 additions & 25 deletions starboard/shared/posix/socket_get_last_error.cc

This file was deleted.

19 changes: 0 additions & 19 deletions starboard/shared/stub/socket_get_last_error.cc

This file was deleted.

8 changes: 0 additions & 8 deletions starboard/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ SB_EXPORT SbSocketError SbSocketListen(SbSocket socket);
// |socket|: The SbSocket that is accepting a pending connection.
SB_EXPORT SbSocket SbSocketAccept(SbSocket socket);

// DEPRECATED with SB_API_VERSION 16
//
// Returns the last error set on |socket|. If |socket| is not valid, this
// function returns |kSbSocketErrorFailed|.
//
// |socket|: The SbSocket that the last error is returned for.
SB_EXPORT SbSocketError SbSocketGetLastError(SbSocket socket);

// DEPRECATED with SB_API_VERSION 16
//
// Gets the address that this socket is bound to locally, if the socket is
Expand Down
1 change: 0 additions & 1 deletion starboard/stub/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static_library("stub_sources") {
"//starboard/shared/stub/socket_create.cc",
"//starboard/shared/stub/socket_destroy.cc",
"//starboard/shared/stub/socket_get_interface_address.cc",
"//starboard/shared/stub/socket_get_last_error.cc",
"//starboard/shared/stub/socket_get_local_address.cc",
"//starboard/shared/stub/socket_is_ipv6_supported.cc",
"//starboard/shared/stub/socket_listen.cc",
Expand Down

0 comments on commit b306e8b

Please sign in to comment.