mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-06 16:11:55 +00:00
Cleanup file descriptors and add more info
This commit is contained in:
@@ -40,7 +40,7 @@ int xsocket(int domain, int type, int protocol);
|
||||
int xbind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
|
||||
int xconnect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
|
||||
int xlisten(int sockfd, int backlog);
|
||||
int xaccept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
int xaccept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
|
||||
void *xmalloc(size_t size);
|
||||
void *xcalloc(size_t nmemb, size_t size);
|
||||
void *xrealloc(void *ptr, size_t size);
|
||||
|
||||
@@ -155,8 +155,8 @@ int xlisten(int sockfd, int backlog) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int xaccept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
|
||||
int fd = accept(sockfd, addr, addrlen);
|
||||
int xaccept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) {
|
||||
int fd = accept4(sockfd, addr, addrlen, flags);
|
||||
if (fd == -1) {
|
||||
PLOGE("accept");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user