Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a

The branch, master has been updated
       via  c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a (commit)
      from  0eb5aa68fbb321477c7e6e0b0452bf1a4186fd99 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a
commit c9384d65f6fb5d6c661f9f65c4b60956e7d4bc1a
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    curl: Immediately abort fetchers when we can
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index c039429..18eba12 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -813,23 +813,6 @@ static void fetch_curl_cache_handle(CURL *handle, 
lwc_string *host)
 
 
 /**
- * Abort a fetch.
- */
-static void fetch_curl_abort(void *vf)
-{
-       struct curl_fetch_info *f = (struct curl_fetch_info *)vf;
-       assert(f);
-       NSLOG(netsurf, INFO, "fetch %p, url '%s'", f, nsurl_access(f->url));
-       if (f->curl_handle) {
-               f->abort = true;
-       } else {
-               fetch_remove_from_queues(f->fetch_handle);
-               fetch_free(f->fetch_handle);
-       }
-}
-
-
-/**
  * Clean up the provided fetch object and free it.
  *
  * Will prod the queue afterwards to allow pending requests to be initiated.
@@ -856,6 +839,30 @@ static void fetch_curl_stop(struct curl_fetch_info *f)
 
 
 /**
+ * Abort a fetch.
+ */
+static void fetch_curl_abort(void *vf)
+{
+       struct curl_fetch_info *f = (struct curl_fetch_info *)vf;
+       assert(f);
+       NSLOG(netsurf, INFO, "fetch %p, url '%s'", f, nsurl_access(f->url));
+       if (f->curl_handle) {
+               if (inside_curl) {
+                       NSLOG(netsurf, DEBUG, "Deferring cleanup");
+                       f->abort = true;
+               } else {
+                       NSLOG(netsurf, DEBUG, "Immediate abort");
+                       fetch_curl_stop(f);
+                       fetch_free(f->fetch_handle);
+               }
+       } else {
+               fetch_remove_from_queues(f->fetch_handle);
+               fetch_free(f->fetch_handle);
+       }
+}
+
+
+/**
  * Free a fetch structure and associated resources.
  */
 static void fetch_curl_free(void *vf)


-----------------------------------------------------------------------

Summary of changes:
 content/fetchers/curl.c |   41 ++++++++++++++++++++++++-----------------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index c039429..18eba12 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -813,23 +813,6 @@ static void fetch_curl_cache_handle(CURL *handle, 
lwc_string *host)
 
 
 /**
- * Abort a fetch.
- */
-static void fetch_curl_abort(void *vf)
-{
-       struct curl_fetch_info *f = (struct curl_fetch_info *)vf;
-       assert(f);
-       NSLOG(netsurf, INFO, "fetch %p, url '%s'", f, nsurl_access(f->url));
-       if (f->curl_handle) {
-               f->abort = true;
-       } else {
-               fetch_remove_from_queues(f->fetch_handle);
-               fetch_free(f->fetch_handle);
-       }
-}
-
-
-/**
  * Clean up the provided fetch object and free it.
  *
  * Will prod the queue afterwards to allow pending requests to be initiated.
@@ -856,6 +839,30 @@ static void fetch_curl_stop(struct curl_fetch_info *f)
 
 
 /**
+ * Abort a fetch.
+ */
+static void fetch_curl_abort(void *vf)
+{
+       struct curl_fetch_info *f = (struct curl_fetch_info *)vf;
+       assert(f);
+       NSLOG(netsurf, INFO, "fetch %p, url '%s'", f, nsurl_access(f->url));
+       if (f->curl_handle) {
+               if (inside_curl) {
+                       NSLOG(netsurf, DEBUG, "Deferring cleanup");
+                       f->abort = true;
+               } else {
+                       NSLOG(netsurf, DEBUG, "Immediate abort");
+                       fetch_curl_stop(f);
+                       fetch_free(f->fetch_handle);
+               }
+       } else {
+               fetch_remove_from_queues(f->fetch_handle);
+               fetch_free(f->fetch_handle);
+       }
+}
+
+
+/**
  * Free a fetch structure and associated resources.
  */
 static void fetch_curl_free(void *vf)


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to