[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 186/205: Curl_expire_latest: ignore already expired
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 186/205: Curl_expire_latest: ignore already expired timers |
Date: |
Thu, 20 Apr 2017 16:22:06 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit ab6d23278e507eb1f8dc1ea6c33191827ae6cc5e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Apr 10 23:53:33 2017 +0200
Curl_expire_latest: ignore already expired timers
If the existing timer is still in there but has expired, the new timer
should be added.
Reported-by: Rainer Canavan
Bug: https://curl.haxx.se/mail/lib-2017-04/0030.html
Closes #1407
---
lib/multi.c | 9 ++++++---
tests/data/test1238 | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/multi.c b/lib/multi.c
index 46286b77b..b24ce19dd 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -3001,11 +3001,14 @@ void Curl_expire_latest(struct Curl_easy *data, time_t
milli)
if(expire->tv_sec || expire->tv_usec) {
/* This means that the struct is added as a node in the splay tree.
Compare if the new time is earlier, and only remove-old/add-new if it
- is. */
+ is. */
time_t diff = curlx_tvdiff(set, *expire);
- if(diff > 0)
- /* the new expire time was later than the top time, so just skip this */
+ if((diff > 0) && (diff < milli)) {
+ /* if the new expire time is later than the top time, skip it, but not
+ if the diff is larger than the new offset since then the previous
+ time is already expired! */
return;
+ }
}
/* Just add the timeout like normal */
diff --git a/tests/data/test1238 b/tests/data/test1238
index 4c976c776..a0eef417d 100644
--- a/tests/data/test1238
+++ b/tests/data/test1238
@@ -10,7 +10,7 @@ TFTP RRQ
# Server-side
<reply>
<servercmd>
-writedelay: 1
+writedelay: 2
</servercmd>
# ~1200 bytes (so that they don't fit in two 512 byte chunks)
<data nocheck="yes">
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type, (continued)
- [GNUnet-SVN] [gnurl] 176/205: CURLINFO_SCHEME.3: fix variable type, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 193/205: unit1303: fix compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 201/205: TLS: Fix switching off SSL session id when client cert is used, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 154/205: url: don't free postponed data on connection reuse, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 69/205: http_proxy: Ignore TE and CL in CONNECT 2xx responses, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 202/205: nss: fix MinGW compiler warnings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 159/205: configure: prefer 'long long' to int64_t for curl_off_t, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 197/205: code: fix typos and style in comments, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 149/205: docs: minor typo in write-out.d, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 181/205: nss: load CA certificates even with --insecure, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 186/205: Curl_expire_latest: ignore already expired timers,
gnunet <=
- [GNUnet-SVN] [gnurl] 155/205: curl_sasl: declare mechtable static, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 150/205: easy: silence compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 138/205: dist: add missing files to the tarball, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 204/205: THANKS: add contributors from 7.54.0 release notes, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 161/205: tool_operate: fix MinGW compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 179/205: libcurl-thread.3: fixed a bad macro that caused test 1140 to fail, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 184/205: polarssl: unbreak build with versions < 1.3.8, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 185/205: system.h: fix mingw section, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 137/205: cmake: fix build with cmake 2.8.12.2, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 192/205: RELEASE-NOTES: synced with 1451271e0, gnunet, 2017/04/20