mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
1008: rename connection.upload_progress to .http_upload_progress
This commit is contained in:
parent
fa51846f68
commit
08941fd47d
@ -55,8 +55,8 @@ get_download_msg(struct download *download, struct terminal *term,
|
||||
&& download->conn->uri->protocol == PROTOCOL_BITTORRENT)
|
||||
return get_bittorrent_message(download, term, wide, full, separator);
|
||||
#endif
|
||||
if (download->conn && download->conn->upload_progress)
|
||||
return get_upload_progress_msg(download->conn->upload_progress,
|
||||
if (download->conn && download->conn->http_upload_progress)
|
||||
return get_upload_progress_msg(download->conn->http_upload_progress,
|
||||
term, wide, full, separator);
|
||||
|
||||
return get_progress_msg(download->progress, term, wide, full, separator);
|
||||
|
@ -343,10 +343,10 @@ upload_stat_timer(struct connection *conn)
|
||||
{
|
||||
struct http_connection_info *http = conn->info;
|
||||
|
||||
assert(conn->upload_progress && http);
|
||||
assert(conn->http_upload_progress && http);
|
||||
if_assert_failed return;
|
||||
|
||||
update_progress(conn->upload_progress, http->post.uploaded,
|
||||
update_progress(conn->http_upload_progress, http->post.uploaded,
|
||||
http->post.total_upload_length, http->post.uploaded);
|
||||
notify_connection_callbacks(conn);
|
||||
}
|
||||
@ -356,7 +356,7 @@ set_connection_state(struct connection *conn, enum connection_state state)
|
||||
{
|
||||
struct download *download;
|
||||
struct progress *progress = conn->progress;
|
||||
struct progress *upload_progress = conn->upload_progress;
|
||||
struct progress *upload_progress = conn->http_upload_progress;
|
||||
|
||||
if (is_in_result_state(conn->state) && is_in_progress_state(state))
|
||||
conn->prev_error = conn->state;
|
||||
@ -501,8 +501,8 @@ done_connection(struct connection *conn)
|
||||
mem_free(conn->socket);
|
||||
mem_free(conn->data_socket);
|
||||
done_progress(conn->progress);
|
||||
if (conn->upload_progress)
|
||||
done_progress(conn->upload_progress);
|
||||
if (conn->http_upload_progress)
|
||||
done_progress(conn->http_upload_progress);
|
||||
mem_free(conn);
|
||||
check_queue_bugs();
|
||||
}
|
||||
|
@ -18,7 +18,15 @@ struct connection {
|
||||
|
||||
LIST_OF(struct download) downloads;
|
||||
struct progress *progress;
|
||||
struct progress *upload_progress;
|
||||
|
||||
/** Progress of sending the request and attached files to the
|
||||
* server. This happens before any download.
|
||||
*
|
||||
* Currently, ELinks supports file uploads only in HTTP and
|
||||
* local CGI. Therefore, upload_stat_timer() in connection.c
|
||||
* assumes that #info points to struct http_connection_info
|
||||
* whenever @c http_upload_progress is not NULL. */
|
||||
struct progress *http_upload_progress;
|
||||
|
||||
/* If no proxy is used uri and proxied_uri are the same. */
|
||||
struct uri *uri;
|
||||
|
@ -1013,8 +1013,8 @@ http_send_header(struct socket *socket)
|
||||
assert(!use_connect); /* see comment above */
|
||||
|
||||
socket->state = SOCKET_END_ONCLOSE;
|
||||
if (!conn->upload_progress && http->post.file_count)
|
||||
conn->upload_progress = init_progress(0);
|
||||
if (!conn->http_upload_progress && http->post.file_count)
|
||||
conn->http_upload_progress = init_progress(0);
|
||||
write_to_socket(socket, header.source, header.length, S_TRANS,
|
||||
send_more_post_data);
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user