void oss_get_part_size(int64_t filesize, int64_t *part_size) { if (filesize > (*part_size) * OSS_MAX_PART_NUM) { *part_size = (filesize + OSS_MAX_PART_NUM - filesize % OSS_MAX_PART_NUM) / OSS_MAX_PART_NUM; aos_warn_log("Part number larger than max limit, " "part size Changed to:%" APR_INT64_T_FMT "\n", *part_size); } }
static void aos_transport_cleanup(aos_http_transport_t *t) { int s; char buf[256]; if (t->req->file_buf != NULL && t->req->file_buf->owner) { aos_trace_log("close request body file."); if ((s = apr_file_close(t->req->file_buf->file)) != APR_SUCCESS) { aos_warn_log("apr_file_close failure, %s.", apr_strerror(s, buf, sizeof(buf))); } t->req->file_buf = NULL; } if (t->resp->file_buf != NULL && t->resp->file_buf->owner) { aos_trace_log("close response body file."); if ((s = apr_file_close(t->resp->file_buf->file)) != APR_SUCCESS) { aos_warn_log("apr_file_close failure, %s.", apr_strerror(s, buf, sizeof(buf))); } t->resp->file_buf = NULL; } }