summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2020-05-26 10:16:51 +0300
committerdefanor <defanor@uberspace.net>2020-05-26 10:27:37 +0300
commit336061f2b643baeeb066f5bf60f837daf851f3ef (patch)
tree4ae78ccb6d06490ece4610bcb8af2e5a577528f5
parent3f24cc565a536461047790a7c9229c7aadf49ccf (diff)
Fix conditions in rexmpp_tcp_conn_timeout and rexmpp_tcp_conn_fds
-rw-r--r--src/rexmpp_tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rexmpp_tcp.c b/src/rexmpp_tcp.c
index 91e4199..e57cfb8 100644
--- a/src/rexmpp_tcp.c
+++ b/src/rexmpp_tcp.c
@@ -336,7 +336,7 @@ int rexmpp_tcp_conn_fds (rexmpp_tcp_conn_t *conn,
{
int max_fd = 0, i;
if (conn->resolution_v4 == REXMPP_CONN_RESOLUTION_WAITING ||
- conn->resolution_v4 == REXMPP_CONN_RESOLUTION_WAITING) {
+ conn->resolution_v6 == REXMPP_CONN_RESOLUTION_WAITING) {
max_fd = ares_fds(conn->resolver_channel, read_fds, write_fds);
}
for (i = 0; i < REXMPP_TCP_MAX_CONNECTION_ATTEMPTS; i++) {
@@ -357,7 +357,7 @@ struct timeval *rexmpp_tcp_conn_timeout (rexmpp_tcp_conn_t *conn,
struct timeval now;
struct timeval *ret = max_tv;
if (conn->resolution_v4 == REXMPP_CONN_RESOLUTION_WAITING ||
- conn->resolution_v4 == REXMPP_CONN_RESOLUTION_WAITING) {
+ conn->resolution_v6 == REXMPP_CONN_RESOLUTION_WAITING) {
ret = ares_timeout(conn->resolver_channel, max_tv, tv);
}
if (conn->resolution_v4 == REXMPP_CONN_RESOLUTION_SUCCESS ||