summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-03-16 01:39:59 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2019-03-16 01:39:59 -0400
commitf2ac4cdfc5e8a37fc742dcd10c6608ac21281ba8 (patch)
treecf848572161a82b6da291cb84597692172833059
parenta78404cfbfbf7355acc061ced402e249fce828ac (diff)
downloadlighttpd1.4-f2ac4cdfc5e8a37fc742dcd10c6608ac21281ba8.zip
lighttpd1.4-f2ac4cdfc5e8a37fc742dcd10c6608ac21281ba8.tar.gz
[core] off_t upload_temp_file_size
-rw-r--r--src/chunk.c8
-rw-r--r--src/chunk.h5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/chunk.c b/src/chunk.c
index f942fcf..e209707 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -29,7 +29,7 @@ static size_t chunk_buf_sz = 4096;
static chunk *chunks;
static chunk *chunk_buffers;
static array *chunkqueue_default_tempdirs = NULL;
-static unsigned int chunkqueue_default_tempfile_size = DEFAULT_TEMPFILE_SIZE;
+static off_t chunkqueue_default_tempfile_size = DEFAULT_TEMPFILE_SIZE;
void chunkqueue_set_chunk_size (size_t sz)
{
@@ -444,7 +444,7 @@ void chunkqueue_use_memory(chunkqueue *cq, size_t len) {
}
}
-void chunkqueue_set_tempdirs_default (array *tempdirs, unsigned int upload_temp_file_size) {
+void chunkqueue_set_tempdirs_default (array *tempdirs, off_t upload_temp_file_size) {
chunkqueue_default_tempdirs = tempdirs;
chunkqueue_default_tempfile_size
= (0 == upload_temp_file_size) ? DEFAULT_TEMPFILE_SIZE
@@ -452,8 +452,7 @@ void chunkqueue_set_tempdirs_default (array *tempdirs, unsigned int upload_temp_
: upload_temp_file_size;
}
-#if 0
-void chunkqueue_set_tempdirs(chunkqueue *cq, array *tempdirs, unsigned int upload_temp_file_size) {
+void chunkqueue_set_tempdirs(chunkqueue *cq, array *tempdirs, off_t upload_temp_file_size) {
force_assert(NULL != cq);
cq->tempdirs = tempdirs;
cq->upload_temp_file_size
@@ -462,7 +461,6 @@ void chunkqueue_set_tempdirs(chunkqueue *cq, array *tempdirs, unsigned int uploa
: upload_temp_file_size;
cq->tempdir_idx = 0;
}
-#endif
void chunkqueue_steal(chunkqueue *dest, chunkqueue *src, off_t len) {
while (len > 0) {
diff --git a/src/chunk.h b/src/chunk.h
index e31177f..ef0a6db 100644
--- a/src/chunk.h
+++ b/src/chunk.h
@@ -43,7 +43,7 @@ typedef struct {
off_t bytes_in, bytes_out;
array *tempdirs;
- unsigned int upload_temp_file_size;
+ off_t upload_temp_file_size;
unsigned int tempdir_idx;
} chunkqueue;
@@ -56,7 +56,8 @@ void chunkqueue_chunk_pool_free(void);
chunkqueue *chunkqueue_init(void);
void chunkqueue_set_chunk_size (size_t sz);
void chunkqueue_set_tempdirs_default_reset (void);
-void chunkqueue_set_tempdirs_default (array *tempdirs, unsigned int upload_temp_file_size);
+void chunkqueue_set_tempdirs_default (array *tempdirs, off_t upload_temp_file_size);
+void chunkqueue_set_tempdirs(chunkqueue *cq, array *tempdirs, off_t upload_temp_file_size);
void chunkqueue_append_file(chunkqueue *cq, buffer *fn, off_t offset, off_t len); /* copies "fn" */
void chunkqueue_append_file_fd(chunkqueue *cq, buffer *fn, int fd, off_t offset, off_t len); /* copies "fn" */
void chunkqueue_append_mem(chunkqueue *cq, const char *mem, size_t len); /* copies memory */