diff options
Diffstat (limited to 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/content/fetch.c b/content/fetch.c index b42e48ea7..f68dea739 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -302,12 +302,6 @@ struct fetch * fetch_start(char *url, char *referer, } } - fetch->next = fetch_list; - if (fetch_list != 0) - fetch_list->prev = fetch; - fetch_list = fetch; - fetch_active = true; - /* create the curl easy handle */ fetch->curl_handle = curl_easy_duphandle(fetch_blank_curl); if (!fetch->curl_handle) @@ -321,6 +315,12 @@ struct fetch * fetch_start(char *url, char *referer, codem = curl_multi_add_handle(curl_multi, fetch->curl_handle); assert(codem == CURLM_OK || codem == CURLM_CALL_MULTI_PERFORM); + fetch->next = fetch_list; + if (fetch_list != 0) + fetch_list->prev = fetch; + fetch_list = fetch; + fetch_active = true; + return fetch; failed: |