From cd4a5891b8e2a019fdfda7512d6490e075628292 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 29 Jun 2021 16:06:44 -0400 Subject: Tokens are now checked for file uploads. Fixed major buffer bugs in status reporting. --- player/tasks.f90 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'player/tasks.f90') diff --git a/player/tasks.f90 b/player/tasks.f90 index e0eecfd..b0f2cc1 100644 --- a/player/tasks.f90 +++ b/player/tasks.f90 @@ -118,7 +118,7 @@ contains allocate(character(len=len_trim(mask)+DIR_LIST_STRING_LENGTH+1) :: fullname) call path_from_file(mask, dir) - allocate(statuses(size(files))) + allocate(statuses(size(files))) do i = 1, size(files) ! On some systems, we're getting subdirectories back... @@ -143,11 +143,15 @@ contains res = .false. end if + + if(.not. res) then + Print *, "Glob failure" + end if end function upload_glob function upload(url, source_filename) result(res) - use config, only: token, captain + use config, only: token, captain, identity use gemini_protocol, only: titan_post_url, STATUS_SUCCESS implicit none @@ -205,7 +209,8 @@ contains if(istatus == 0) then Print *, "Writing "//trim(mod_url) - istatus = titan_post_url(mod_url, unit_number, file_size, token) + istatus = titan_post_url(mod_url, unit_number, file_size, trim(identity)//":"//trim(token)) + Print *, "Response code from server: ", istatus res = (istatus == STATUS_SUCCESS) close(unit_number) else @@ -214,6 +219,10 @@ contains deallocate(mod_url) + if(.not. res) then + Print *, "Upload Failure" + end if + end function upload function download(url, destination_filename) -- cgit v1.2.3