mirror of https://github.com/getdnsapi/getdns.git
Few more renames
This commit is contained in:
parent
3b7b83e309
commit
4508ec77fb
|
@ -245,7 +245,7 @@ select_eventloop_run_once(getdns_eventloop *loop, int blocking)
|
||||||
#endif
|
#endif
|
||||||
if (select(max_fd + 1, &readfds, &writefds, NULL,
|
if (select(max_fd + 1, &readfds, &writefds, NULL,
|
||||||
(timeout == TIMEOUT_FOREVER ? NULL : &tv)) < 0) {
|
(timeout == TIMEOUT_FOREVER ? NULL : &tv)) < 0) {
|
||||||
if (_getdns_socket_retr())
|
if (_getdns_socket_wants_retry())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_SCHED("I/O error with select(): %s\n", _getdns_errnostr());
|
DEBUG_SCHED("I/O error with select(): %s\n", _getdns_errnostr());
|
||||||
|
|
|
@ -137,12 +137,12 @@ const char *_getdns_strerror(int errnum);
|
||||||
void _getdns_perror(const char *str);
|
void _getdns_perror(const char *str);
|
||||||
|
|
||||||
#define _getdns_errnostr() (_getdns_strerror(_getdns_socketerror()))
|
#define _getdns_errnostr() (_getdns_strerror(_getdns_socketerror()))
|
||||||
#define _getdns_errno_retry(X) ( (X) == _getdns_EINTR \
|
#define _getdns_error_wants_retry(X) ( (X) == _getdns_EINTR \
|
||||||
|| (X) == _getdns_EAGAIN \
|
|| (X) == _getdns_EAGAIN \
|
||||||
|| (X) == _getdns_EWOULDBLOCK \
|
|| (X) == _getdns_EWOULDBLOCK \
|
||||||
|| (X) == _getdns_EINPROGRESS \
|
|| (X) == _getdns_EINPROGRESS \
|
||||||
|| (X) == _getdns_ENOBUFS )
|
|| (X) == _getdns_ENOBUFS )
|
||||||
#define _getdns_socket_wants_retry() (_getdns_errno_retry(_getdns_socketerror()))
|
#define _getdns_socket_wants_retry() (_getdns_error_wants_retry(_getdns_socketerror()))
|
||||||
#define _getdns_resource_depletion() ( _getdns_socketerror() == _getdns_ENFILE \
|
#define _getdns_resource_depletion() ( _getdns_socketerror() == _getdns_ENFILE \
|
||||||
|| _getdns_socketerror() == _getdns_EMFILE )
|
|| _getdns_socketerror() == _getdns_EMFILE )
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ tcp_connected(getdns_upstream *upstream) {
|
||||||
int error = 0;
|
int error = 0;
|
||||||
socklen_t len = (socklen_t)sizeof(error);
|
socklen_t len = (socklen_t)sizeof(error);
|
||||||
getsockopt(upstream->fd, SOL_SOCKET, SO_ERROR, (void*)&error, &len);
|
getsockopt(upstream->fd, SOL_SOCKET, SO_ERROR, (void*)&error, &len);
|
||||||
if (_getdns_errno_retry(error))
|
if (_getdns_error_wants_retry(error))
|
||||||
return STUB_TCP_RETRY;
|
return STUB_TCP_RETRY;
|
||||||
else if (error != 0) {
|
else if (error != 0) {
|
||||||
return STUB_SETUP_ERROR;
|
return STUB_SETUP_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue