aboutsummaryrefslogtreecommitdiff
path: root/captain
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-08-20 09:25:31 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-08-20 09:25:31 -0400
commit81293bf4a46693e0598d8880fdbdd715e8801ccc (patch)
tree5fd29a899d6a21d3d36ceae8fa04bb7fb9518a14 /captain
parent010380a9afc53db7e200db2e7c04b86269dfd1e0 (diff)
downloadlevitating-81293bf4a46693e0598d8880fdbdd715e8801ccc.tar.gz
levitating-81293bf4a46693e0598d8880fdbdd715e8801ccc.zip
Attempt to streamline handling of titan uploads on the server
Diffstat (limited to 'captain')
-rw-r--r--captain/response.f9017
1 files changed, 4 insertions, 13 deletions
diff --git a/captain/response.f90 b/captain/response.f90
index 0506125..8934e4e 100644
--- a/captain/response.f90
+++ b/captain/response.f90
@@ -577,11 +577,11 @@ contains
character(*), intent(in)::filename
integer::unum
- character(len=1), dimension(64)::buf
+ character(len=1), dimension(1024)::buf
integer::bufread
- integer(kind=8)::bytes_to_go, written
- integer::i, istat
+ integer(kind=8)::bytes_to_go
+ integer::istat
logical::success
@@ -593,24 +593,15 @@ contains
action="write", access='stream', iostat=istat)
bytes_to_go = self%size
- written = 0
do while(bytes_to_go > 0 .and. istat == 0)
bufread = ssl_read(self%ssl_connection, buf)
bytes_to_go = bytes_to_go - bufread
- !write(msg, '(A5, 1X, I8, 3X, A5, 1X, I8)') "READ:", bufread, "TOGO:", bytes_to_go
- !call write_log(trim(msg))
+ write(unum, iostat=istat) buf(1:bufread)
- do i = 1, bufread
- !write(unum, '(A1)', advance='no') buf(i)
- write(unum, iostat=istat) buf(i)
- written = written + 1
- end do
end do
- !write(msg, '(A8, 1X, I8, 3x, A5, 1X, I8)') "WRITTEN:", written, "LAST:", ichar(buf(1))
- !call write_log(trim(msg))
close(unum)
success = (istat == 0)