1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

NET: Rename old to download in cancel_download

This commit is contained in:
Jonas Fonseca 2006-02-03 10:44:30 +01:00 committed by Jonas Fonseca
parent 637f1e82e6
commit c51300066f

View File

@ -979,26 +979,26 @@ load_uri(struct uri *uri, struct uri *referrer, struct download *download,
/* FIXME: one object in more connections */
void
cancel_download(struct download *old, int interrupt)
cancel_download(struct download *download, int interrupt)
{
struct connection *conn;
assert(old);
assert(download);
if_assert_failed return;
if (is_in_result_state(old->state))
if (is_in_result_state(download->state))
return;
check_queue_bugs();
conn = old->conn;
conn = download->conn;
conn->pri[old->pri]--;
assertm(conn->pri[old->pri] >= 0, "priority counter underflow");
if_assert_failed conn->pri[old->pri] = 0;
conn->pri[download->pri]--;
assertm(conn->pri[download->pri] >= 0, "priority counter underflow");
if_assert_failed conn->pri[download->pri] = 0;
del_from_list(old);
old->state = S_INTERRUPTED;
del_from_list(download);
download->state = S_INTERRUPTED;
if (list_empty(conn->downloads)) {
/* Necessary because of assertion in get_priority(). */