adb: add better logging for connection failure.
Test: manual
Change-Id: I1babee0e01376955529dc1e7d5e3257a7f51f33d
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index f2911e0..0c2e45c 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -493,21 +493,7 @@
return _fd_set_error_str(socket_local_server(name, namespace_id, type), error);
}
-inline int network_connect(const std::string& host, int port, int type,
- int timeout, std::string* error) {
- int getaddrinfo_error = 0;
- int fd = socket_network_client_timeout(host.c_str(), port, type, timeout,
- &getaddrinfo_error);
- if (fd != -1) {
- return fd;
- }
- if (getaddrinfo_error != 0) {
- *error = gai_strerror(getaddrinfo_error);
- } else {
- *error = strerror(errno);
- }
- return -1;
-}
+int network_connect(const std::string& host, int port, int type, int timeout, std::string* error);
static __inline__ int adb_socket_accept(int serverfd, struct sockaddr* addr, socklen_t *addrlen)
{