]> granicus.if.org Git - libevent/commitdiff
changed strtotimeval signature as per #211
authorXiao Bao Clark <xiaobaoclark@gmail.com>
Wed, 28 Jan 2015 06:17:02 +0000 (17:17 +1100)
committerXiao Bao Clark <xiaobaoclark@gmail.com>
Wed, 28 Jan 2015 06:17:02 +0000 (17:17 +1100)
evdns.c

diff --git a/evdns.c b/evdns.c
index 615cd880b6af71656293488a2d85e844ae0d0f6e..4fa6769facd35825995f21a01ee3ac44bc1ea8df 100644 (file)
--- a/evdns.c
+++ b/evdns.c
@@ -3324,7 +3324,7 @@ strtoint(const char *const str)
 
 /* Parse a number of seconds into a timeval; return -1 on error. */
 static int
-strtotimeval(const char *const str, struct timeval *out)
+evdns_strtotimeval(const char *const str, struct timeval *out)
 {
        double d;
        char *endptr;
@@ -3427,13 +3427,13 @@ evdns_base_set_option_impl(struct evdns_base *base,
                base->global_search_state->ndots = ndots;
        } else if (str_matches_option(option, "timeout:")) {
                struct timeval tv;
-               if (strtotimeval(val, &tv) == -1) return -1;
+               if (evdns_strtotimeval(val, &tv) == -1) return -1;
                if (!(flags & DNS_OPTION_MISC)) return 0;
                log(EVDNS_LOG_DEBUG, "Setting timeout to %s", val);
                memcpy(&base->global_timeout, &tv, sizeof(struct timeval));
        } else if (str_matches_option(option, "getaddrinfo-allow-skew:")) {
                struct timeval tv;
-               if (strtotimeval(val, &tv) == -1) return -1;
+               if (evdns_strtotimeval(val, &tv) == -1) return -1;
                if (!(flags & DNS_OPTION_MISC)) return 0;
                log(EVDNS_LOG_DEBUG, "Setting getaddrinfo-allow-skew to %s",
                    val);
@@ -3475,7 +3475,7 @@ evdns_base_set_option_impl(struct evdns_base *base,
                base->global_outgoing_addrlen = len;
        } else if (str_matches_option(option, "initial-probe-timeout:")) {
                struct timeval tv;
-               if (strtotimeval(val, &tv) == -1) return -1;
+               if (evdns_strtotimeval(val, &tv) == -1) return -1;
                if (tv.tv_sec > 3600)
                        tv.tv_sec = 3600;
                if (!(flags & DNS_OPTION_MISC)) return 0;