Loading ares/ares_gethostbyaddr.c +1 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,7 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host) switch(error) { case ENOENT: case ESRCH: return ARES_ENOTFOUND; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", Loading ares/ares_gethostbyname.c +17 −2 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ static int file_lookup(const char *name, int family, struct hostent **host) FILE *fp; char **alias; int status; int error; #ifdef WIN32 char PATH_HOSTS[MAX_PATH]; Loading Loading @@ -280,8 +281,22 @@ static int file_lookup(const char *name, int family, struct hostent **host) fp = fopen(PATH_HOSTS, "r"); if (!fp) { error = ERRNO; switch(error) { case ENOENT: case ESRCH: return ARES_ENOTFOUND; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); DEBUGF(fprintf(stderr, "Error opening file: %s\n", PATH_HOSTS)); *host = NULL; return ARES_EFILE; } } while ((status = ares__get_hostent(fp, family, host)) == ARES_SUCCESS) { if (strcasecmp((*host)->h_name, name) == 0) Loading ares/ares_init.c +4 −0 Original line number Diff line number Diff line Loading @@ -639,6 +639,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -664,6 +665,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -690,6 +692,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -716,6 +719,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading ares/ares_search.c +1 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,7 @@ static int single_domain(ares_channel channel, const char *name, char **s) switch(error) { case ENOENT: case ESRCH: break; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", Loading tests/server/sockfilt.c +7 −3 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ static int juggle(curl_socket_t *sockfdp, client connecting. */ sockfd = accept(sockfd, NULL, NULL); if(CURL_SOCKET_BAD == sockfd) logmsg("accept() failed\n"); logmsg("accept() failed"); else { logmsg("====> Client connect"); write(fileno(stdout), "CNCT\n", 5); Loading Loading @@ -438,7 +438,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock, if(getsockname(sock, (struct sockaddr *) &add, &socksize)<0) { fprintf(stderr, "getsockname() failed"); logmsg("getsockname() failed with error: %d", SOCKERRNO); return CURL_SOCKET_BAD; } *port = ntohs(add.sin_port); Loading Loading @@ -489,6 +489,7 @@ int main(int argc, char *argv[]) FILE *pidfile; char *pidname= (char *)".sockfilt.pid"; int rc; int error; int arg=1; enum sockmode mode = PASSIVE_LISTEN; /* default */ Loading Loading @@ -631,7 +632,10 @@ int main(int argc, char *argv[]) logmsg("Wrote pid %d to %s", pid, pidname); } else { fprintf(stderr, "Couldn't write pid file\n"); error = ERRNO; logmsg("fopen() failed with error: %d %s\n", error, strerror(error)); logmsg("Error opening file: %s\n", pidname); logmsg("Couldn't write pid file\n"); sclose(sock); return 1; } Loading Loading
ares/ares_gethostbyaddr.c +1 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,7 @@ static int file_lookup(union ares_addr *addr, int family, struct hostent **host) switch(error) { case ENOENT: case ESRCH: return ARES_ENOTFOUND; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", Loading
ares/ares_gethostbyname.c +17 −2 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ static int file_lookup(const char *name, int family, struct hostent **host) FILE *fp; char **alias; int status; int error; #ifdef WIN32 char PATH_HOSTS[MAX_PATH]; Loading Loading @@ -280,8 +281,22 @@ static int file_lookup(const char *name, int family, struct hostent **host) fp = fopen(PATH_HOSTS, "r"); if (!fp) { error = ERRNO; switch(error) { case ENOENT: case ESRCH: return ARES_ENOTFOUND; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); DEBUGF(fprintf(stderr, "Error opening file: %s\n", PATH_HOSTS)); *host = NULL; return ARES_EFILE; } } while ((status = ares__get_hostent(fp, family, host)) == ARES_SUCCESS) { if (strcasecmp((*host)->h_name, name) == 0) Loading
ares/ares_init.c +4 −0 Original line number Diff line number Diff line Loading @@ -639,6 +639,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -664,6 +665,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -690,6 +692,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading @@ -716,6 +719,7 @@ DhcpNameServer error = ERRNO; switch(error) { case ENOENT: case ESRCH: status = ARES_EOF; break; default: Loading
ares/ares_search.c +1 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,7 @@ static int single_domain(ares_channel channel, const char *name, char **s) switch(error) { case ENOENT: case ESRCH: break; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", Loading
tests/server/sockfilt.c +7 −3 Original line number Diff line number Diff line Loading @@ -353,7 +353,7 @@ static int juggle(curl_socket_t *sockfdp, client connecting. */ sockfd = accept(sockfd, NULL, NULL); if(CURL_SOCKET_BAD == sockfd) logmsg("accept() failed\n"); logmsg("accept() failed"); else { logmsg("====> Client connect"); write(fileno(stdout), "CNCT\n", 5); Loading Loading @@ -438,7 +438,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock, if(getsockname(sock, (struct sockaddr *) &add, &socksize)<0) { fprintf(stderr, "getsockname() failed"); logmsg("getsockname() failed with error: %d", SOCKERRNO); return CURL_SOCKET_BAD; } *port = ntohs(add.sin_port); Loading Loading @@ -489,6 +489,7 @@ int main(int argc, char *argv[]) FILE *pidfile; char *pidname= (char *)".sockfilt.pid"; int rc; int error; int arg=1; enum sockmode mode = PASSIVE_LISTEN; /* default */ Loading Loading @@ -631,7 +632,10 @@ int main(int argc, char *argv[]) logmsg("Wrote pid %d to %s", pid, pidname); } else { fprintf(stderr, "Couldn't write pid file\n"); error = ERRNO; logmsg("fopen() failed with error: %d %s\n", error, strerror(error)); logmsg("Error opening file: %s\n", pidname); logmsg("Couldn't write pid file\n"); sclose(sock); return 1; } Loading