summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-31 13:54:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-31 13:54:12 +0000
commitc41c5a0ef236f1eb1a973eeb25f47e848c9e68db (patch)
tree319694e18aded30c73897fb4b776311f54c807a5
parentc0c0283356f288ba98e374964231007f623e84cd (diff)
downloadgnurl-c41c5a0ef236f1eb1a973eeb25f47e848c9e68db.tar.gz
gnurl-c41c5a0ef236f1eb1a973eeb25f47e848c9e68db.tar.bz2
gnurl-c41c5a0ef236f1eb1a973eeb25f47e848c9e68db.zip
curl_read() and Curl_read() now have ssize_t in the last argument
-rw-r--r--CHANGES11
-rw-r--r--include/curl/curl.h2
-rw-r--r--lib/ftp.c2
-rw-r--r--lib/http.c2
-rw-r--r--lib/sendf.c6
-rw-r--r--lib/sendf.h2
-rw-r--r--lib/telnet.c2
7 files changed, 19 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index faf23bae7..e3398537d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,17 @@
History of Changes
+Daniel (31 January 2001)
+- Curl_read() and curl_read() now return a ssize_t for the size, as it had to
+ be able to return -1. The telnet support crashed due to this and there was
+ a possibility to weird behaviour all over.
+
+Daniel (30 January 2001)
+- I finally took a stab at the long-term FIXME item I've had on myself, and
+ now libcurl will properly work when doing a HTTP range-request that follows
+ a Location:. Previously that would make libcurl fail saying that the server
+ doesn't seem to support range requests.
+
Daniel (29 January 2001)
- I added a test case for the HTTP PUT resume thing (test case 33).
diff --git a/include/curl/curl.h b/include/curl/curl.h
index cbfc3e1db..9568e880c 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -554,7 +554,7 @@ CURLcode curl_setopt(CURL *handle, CURLoption option, ...);
CURLcode curl_close(CURL *curl); /* the opposite of curl_open() */
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
- size_t *n);
+ ssize_t *n);
CURLcode curl_write(CURLconnect *c_conn, char *buf, size_t amount,
size_t *n);
diff --git a/lib/ftp.c b/lib/ftp.c
index e7c968a00..0a2c43aaf 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -221,7 +221,7 @@ int Curl_GetFTPResponse(int sockfd, char *buf,
int *ftpcode)
{
int nread;
- size_t keepon=TRUE;
+ ssize_t keepon=TRUE;
char *ptr;
int timeout = 3600; /* in seconds */
struct timeval interval;
diff --git a/lib/http.c b/lib/http.c
index 41e5e87bf..9fe056c5f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -214,7 +214,7 @@ CURLcode add_buffer(send_buffer *in, void *inptr, size_t size)
static
int GetLine(int sockfd, char *buf, struct connectdata *conn)
{
- size_t nread;
+ ssize_t nread;
int read_rc=1;
char *ptr;
struct UrlData *data=conn->data;
diff --git a/lib/sendf.c b/lib/sendf.c
index a0850d53d..d077d8b15 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -198,10 +198,10 @@ CURLcode Curl_client_write(struct UrlData *data,
*/
CURLcode Curl_read(struct connectdata *conn, int sockfd,
char *buf, size_t buffersize,
- size_t *n)
+ ssize_t *n)
{
struct UrlData *data = conn->data;
- size_t nread;
+ ssize_t nread;
#ifdef USE_SSLEAY
if (data->ssl.use) {
@@ -234,7 +234,7 @@ CURLcode Curl_read(struct connectdata *conn, int sockfd,
*/
CURLcode curl_read(CURLconnect *c_conn, char *buf, size_t buffersize,
- size_t *n)
+ ssize_t *n)
{
struct connectdata *conn = (struct connectdata *)c_conn;
diff --git a/lib/sendf.h b/lib/sendf.h
index 5c1510f89..26af533e4 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -47,7 +47,7 @@ CURLcode Curl_client_write(struct UrlData *data, int type, char *ptr,
/* internal read-function, does plain socket, SSL and krb4 */
CURLcode Curl_read(struct connectdata *conn, int sockfd,
char *buf, size_t buffersize,
- size_t *n);
+ ssize_t *n);
/* internal write-function, does plain socket, SSL and krb4 */
CURLcode Curl_write(struct connectdata *conn, int sockfd,
void *mem, size_t len,
diff --git a/lib/telnet.c b/lib/telnet.c
index 9deb13d75..201bd6b50 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -833,7 +833,7 @@ CURLcode Curl_telnet(struct connectdata *conn)
bool keepon = TRUE;
char *buf = data->buffer;
- size_t nread;
+ ssize_t nread;
init_telnet(data);