diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-29 16:06:44 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-29 16:06:44 -0400 |
commit | cd4a5891b8e2a019fdfda7512d6490e075628292 (patch) | |
tree | 8012dc7dc52f17632f5b429dea79709e55ab96c4 /player/tasks.f90 | |
parent | d282a7e283a1704cdde2649c7caf130fb923051a (diff) | |
download | levitating-cd4a5891b8e2a019fdfda7512d6490e075628292.tar.gz levitating-cd4a5891b8e2a019fdfda7512d6490e075628292.zip |
Tokens are now checked for file uploads. Fixed major buffer bugs in status reporting.
Diffstat (limited to 'player/tasks.f90')
-rw-r--r-- | player/tasks.f90 | 15 |
1 files changed, 12 insertions, 3 deletions
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) |