[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 65/254: upload: UPLOAD_BUFSIZE is now for the uploa
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 65/254: upload: UPLOAD_BUFSIZE is now for the upload buffer |
Date: |
Sat, 17 Jun 2017 16:51:37 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit 89cf6f38d2f525cbc8537a60061f5f37bb2f35f7
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Apr 25 14:37:06 2017 +0200
upload: UPLOAD_BUFSIZE is now for the upload buffer
---
lib/file.c | 2 +-
lib/smb.c | 2 +-
lib/transfer.c | 2 +-
lib/urldata.h | 6 +++++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/file.c b/lib/file.c
index 4b1017c6f..dc458db1f 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -360,7 +360,7 @@ static CURLcode file_upload(struct connectdata *conn)
while(!result) {
int readcount;
- result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount);
+ result = Curl_fillreadbuffer(conn, (int)data->set.buffer_size, &readcount);
if(result)
break;
diff --git a/lib/smb.c b/lib/smb.c
index 51b3434cb..5b1ffa9b7 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -607,7 +607,7 @@ static CURLcode smb_send_and_recv(struct connectdata *conn,
void **msg)
/* Check if there is data in the transfer buffer */
if(!smbc->send_size && smbc->upload_size) {
- int nread = smbc->upload_size > BUFSIZE ? BUFSIZE :
+ int nread = smbc->upload_size > UPLOAD_BUFSIZE ? UPLOAD_BUFSIZE :
(int) smbc->upload_size;
conn->data->req.upload_fromhere = conn->data->state.uploadbuffer;
result = Curl_fillreadbuffer(conn, nread, &nread);
diff --git a/lib/transfer.c b/lib/transfer.c
index d6aac675b..bafb6e9c8 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -904,7 +904,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data,
sending_http_headers = FALSE;
}
- result = Curl_fillreadbuffer(conn, BUFSIZE, &fillcount);
+ result = Curl_fillreadbuffer(conn, UPLOAD_BUFSIZE, &fillcount);
if(result)
return result;
diff --git a/lib/urldata.h b/lib/urldata.h
index 6e87684bf..22b0f8195 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -207,6 +207,10 @@
#define MAX_BUFSIZE CURL_MAX_READ_SIZE
#define MIN_BUFSIZE 1024
+/* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as
+ it needs to hold a full buffer as could be sent in a write callback */
+#define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE
+
/* Initial size of the buffer to store headers in, it'll be enlarged in case
of need. */
#define HEADERSIZE 256
@@ -1333,7 +1337,7 @@ struct UrlState {
size_t headersize; /* size of the allocation */
char *buffer; /* download buffer */
- char uploadbuffer[BUFSIZE+1]; /* upload buffer */
+ char uploadbuffer[UPLOAD_BUFSIZE+1]; /* upload buffer */
curl_off_t current_speed; /* the ProgressShow() function sets this,
bytes / second */
bool this_is_a_follow; /* this is a followed Location: request */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 81/254: lib: fix compiler warnings, (continued)
- [GNUnet-SVN] [gnurl] 81/254: lib: fix compiler warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 47/254: tool_cb_prg: fix double-promotion warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 63/254: http-proxy: use a dedicated CONNECT response buffer, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 94/254: curl_slist_append.3: clarify a NULL input creates a new list, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 112/254: libtest: fix MinGW-w64 warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 91/254: runtests: add -o to run test cases in scrambled order, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 115/254: tests: give each stunnel.conf file a unique name, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 113/254: tftpd: fix signed/unsigned mismatch warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 79/254: typecheck-gcc: add missing string options, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 83/254: CURLINFO_REDIRECT_URL.3: add example, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 65/254: upload: UPLOAD_BUFSIZE is now for the upload buffer,
gnunet <=
- [GNUnet-SVN] [gnurl] 121/254: tool: fix remaining -Wcast-qual warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 132/254: FAQ: add 7.4 to toc, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 126/254: multi: use a fixed array of timers instead of malloc, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 48/254: tests: declare TU-local variables static, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 119/254: tests: list the primary server first in the server section, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 134/254: THANKS: add a few missing names, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 109/254: runtests: fix "use of undefined value" warning in -R handling, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 31/254: Makefile: fix make dist, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 59/254: http2: use the correct set buffer size, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 95/254: tests/server: run checksrc by default in debug-builds, gnunet, 2017/06/17