}
}
-void reset_http_info(http_info_t *http_info)
-{
- if (http_info) {
- DA_LOGI("[TEST] location_url[%p]", http_info->location_url);
- free(http_info->location_url);
- http_info->location_url = DA_NULL;
- free(http_info->content_type_from_header);
- http_info->content_type_from_header = DA_NULL;
- if (http_info->proxy_info) {
- __destroy_proxy_info(http_info->proxy_info);
- http_info->proxy_info = DA_NULL;
- }
- if (http_info->http_msg_request) {
- __destroy_http_msg_request(http_info->http_msg_request);
- http_info->http_msg_request = DA_NULL;
- }
- if (http_info->http_msg_response) {
- __destroy_http_msg_response(http_info->http_msg_response);
- http_info->http_msg_response = DA_NULL;
- }
- if (http_info->http_msg) {
- __destroy_http_msg(http_info->http_msg);
- http_info->http_msg = DA_NULL;
- }
- http_info->http_method = HTTP_METHOD_GET;
- http_info->content_len_from_header = 0;
- http_info->total_size = 0;
- }
-}
-
da_bool_t is_valid_download_id(int download_id)
{
da_ret_t ret = DA_RESULT_OK;
DA_MUTEX_UNLOCK(&(http_info->mutex_http));
break;
case HTTP_STATE_PAUSED:
- reset_http_info(http_info);
DA_MUTEX_LOCK(&(http_info->mutex_state));
http_info->state = HTTP_STATE_CANCELED;
DA_MUTEX_UNLOCK(&(http_info->mutex_state));
da_ret_t get_da_info_with_da_id(int id, da_info_t **out_info);
da_ret_t init_http_msg_t(http_msg_t **http_msg);
void destroy_http_msg_t(http_msg_t *http_msg);
-void reset_http_info(http_info_t *http_info);
void reset_http_info_for_resume(http_info_t *http_info);
void destroy_http_info(http_info_t *http_info);
void destroy_file_info(file_info_t *file_info);