1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

FTP, NNTP: Normalize the cache entry before setting the connection state

... so it is normalized when the download callbacks are called.
This commit is contained in:
Jonas Fonseca 2006-02-08 20:45:15 +01:00 committed by Jonas Fonseca
parent d2c7fc05e9
commit 1735f96a87
2 changed files with 3 additions and 5 deletions

View File

@ -1347,11 +1347,10 @@ out_of_mem:
static void
ftp_end_request(struct connection *conn, enum connection_state state)
{
set_connection_state(conn, state);
if (conn->state == S_OK && conn->cached) {
if (state == S_OK && conn->cached) {
normalize_cache_entry(conn->cached, conn->from);
}
set_connection_state(conn, state);
add_keepalive_connection(conn, FTP_KEEPALIVE_TIMEOUT, NULL);
}

View File

@ -217,8 +217,6 @@ nntp_end_request(struct connection *conn, enum connection_state state)
return;
}
set_connection_state(conn, state);
if (conn->state == S_OK) {
if (conn->cached) {
normalize_cache_entry(conn->cached, conn->from);
@ -228,6 +226,7 @@ nntp_end_request(struct connection *conn, enum connection_state state)
* grabing the keepalive connection will be able to go on. */
}
set_connection_state(conn, state);
add_keepalive_connection(conn, NNTP_KEEPALIVE_TIMEOUT, nntp_quit);
}