Mercurial > gftp.yaz
diff lib/protocols.c @ 244:afbbc72b73e2
2003-8-3 Brian Masney <masneyb@gftp.org>
* lib/local.c (local_put_file) - specify an initial file creation mode
of 0644
* lib/misc.c lib/gftp.h - added gftp_parse_file_size(). This function
works correctly for files greater than 2.1GB
* lib/rfc959.c (rfc959_get_file) lib/protocols.c lib/rfc2068.c
lib/rfc959.c - use gftp_parse_file_size()
* lib/protocols.c lib/gftp.h (gftp_get_file, gftp_put_file,
gftp_transfer_file) - changed type of startsize paramter from size_t
to off_t
| author | masneyb |
|---|---|
| date | Sun, 03 Aug 2003 18:44:29 +0000 |
| parents | b42e7233533a |
| children | 41af60bc1f88 |
line wrap: on
line diff
--- a/lib/protocols.c Fri Aug 01 01:47:54 2003 +0000 +++ b/lib/protocols.c Sun Aug 03 18:44:29 2003 +0000 @@ -155,7 +155,7 @@ off_t gftp_get_file (gftp_request * request, const char *filename, int fd, - size_t startsize) + off_t startsize) { float maxkbs; @@ -172,13 +172,14 @@ request->cached = 0; if (request->get_file == NULL) return (GFTP_EFATAL); + return (request->get_file (request, filename, fd, startsize)); } int gftp_put_file (gftp_request * request, const char *filename, int fd, - size_t startsize, size_t totalsize) + off_t startsize, off_t totalsize) { float maxkbs; @@ -202,9 +203,9 @@ long gftp_transfer_file (gftp_request * fromreq, const char *fromfile, - int fromfd, size_t fromsize, + int fromfd, off_t fromsize, gftp_request * toreq, const char *tofile, - int tofd, size_t tosize) + int tofd, off_t tosize) { long size; int ret; @@ -1130,7 +1131,7 @@ fle->file = g_strdup (str); curpos = goto_next_token (curpos + 1); - fle->size = strtol (curpos, NULL, 10) * 512; /* Is this correct? */ + fle->size = gftp_parse_file_size (curpos) * 512; /* Is this correct? */ curpos = goto_next_token (curpos); if ((fle->datetime = parse_time (curpos, &curpos)) == 0) @@ -1176,7 +1177,7 @@ *fle->attribs = 'd'; break; case 's': - fle->size = strtol (startpos + 1, NULL, 10); + fle->size = gftp_parse_file_size (startpos + 1); break; case 'm': fle->datetime = strtol (startpos + 1, NULL, 10); @@ -1291,7 +1292,7 @@ /* This is a regular file */ if ((endpos = strchr (startpos, ' ')) == NULL) return (GFTP_EFATAL); - fle->size = strtol (startpos, NULL, 10); + fle->size = gftp_parse_file_size (startpos); } /* Skip the blanks till we get to the next entry */ @@ -1342,7 +1343,7 @@ else { fle->attribs = g_strdup ("-rw-rw-rw-"); - fle->size = strtol (startpos, NULL, 10); + fle->size = gftp_parse_file_size (startpos); } startpos = goto_next_token (startpos); @@ -1370,7 +1371,7 @@ fle->group = g_strdup (_("unknown")); - fle->size = strtol (startpos, NULL, 10); + fle->size = gftp_parse_file_size (startpos); startpos = goto_next_token (startpos); if ((fle->datetime = parse_time (startpos, &startpos)) == 0)
