diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-05 12:02:46 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-05 12:02:46 -0400 |
commit | 15837a5fd46a1c9051d54138ba3ade26c74091f1 (patch) | |
tree | 9f2bca5660c75222a227c19c754f6a1ecd7fb75b | |
parent | 27c3147c7efe37657563fadcb835b50d00423475 (diff) | |
download | levitating-15837a5fd46a1c9051d54138ba3ade26c74091f1.tar.gz levitating-15837a5fd46a1c9051d54138ba3ade26c74091f1.zip |
Fixed URL issues in player
-rw-r--r-- | common/network.F90 | 2 | ||||
-rw-r--r-- | common/protocol.f90 | 2 | ||||
-rw-r--r-- | common/utilities.F90 | 2 | ||||
-rw-r--r-- | player/endpoints.f90 | 17 | ||||
-rw-r--r-- | player/talking.f90 | 2 |
5 files changed, 11 insertions, 14 deletions
diff --git a/common/network.F90 b/common/network.F90 index 90bf2be..860830b 100644 --- a/common/network.F90 +++ b/common/network.F90 @@ -293,7 +293,7 @@ implicit none ! Extract the name hnamelen = strlen_c(cres%h_name) call c_f_pointer(cres%h_name, h_name, [hnamelen]) - allocate(character(len=i) :: res%h_name) + allocate(character(len=hnamelen) :: res%h_name) do i = 1, hnamelen res%h_name(i:i) = h_name(i) end do diff --git a/common/protocol.f90 b/common/protocol.f90 index be6f280..3b4a8a3 100644 --- a/common/protocol.f90 +++ b/common/protocol.f90 @@ -180,7 +180,7 @@ contains else - write(unit_number) buffer(i) + write(unit_number, '(A1)', advance='no') buffer(i) end if diff --git a/common/utilities.F90 b/common/utilities.F90 index 3ce3363..895e604 100644 --- a/common/utilities.F90 +++ b/common/utilities.F90 @@ -122,7 +122,6 @@ contains function generate_temporary_filename() result(fullpath) use iso_c_binding - use logging implicit none character(len=:), pointer::fullpath @@ -182,7 +181,6 @@ contains ! Convert the C Ptr to a Fortran object clength = c_strlen(tmp_name) if(clength == 0) then - call write_log("temp name is zero length") stop end if call c_f_pointer(tmp_name, cfullpath, (/ clength /)) diff --git a/player/endpoints.f90 b/player/endpoints.f90 index 8ec339d..6a2c955 100644 --- a/player/endpoints.f90 +++ b/player/endpoints.f90 @@ -55,23 +55,21 @@ contains allocate(character(len=length_estimate) :: holding) holding = " " + print *, trim(str) + ! Find the field field_location = index(str, "{"//trim(field)//"}") if(field_location > 0) then - - holding(1:field_location-1) = str(1:field_location-1) - - j = field_location - holding(j:j+len_trim(val)) = trim(val) - + i = field_location + len_trim(field) + 2 - j = len_trim(holding)+1 - holding(j:j+(len_trim(str)-i)) = str(i:len_trim(str)) - + holding = str(1:field_location-1)//trim(val)//str(i:len_trim(str)) + ! Put the results back now str = holding end if + + print *, trim(str) deallocate(holding) @@ -143,6 +141,7 @@ contains else call base_url(captain, LOCATION_JOB_FAILED, .false., res) end if + call replace_field(res, "name", identity) call replace_field(res, "jobid", job) end subroutine get_job_report_url diff --git a/player/talking.f90 b/player/talking.f90 index f41d3bb..9c9db05 100644 --- a/player/talking.f90 +++ b/player/talking.f90 @@ -46,7 +46,7 @@ contains character(:), pointer::filename integer::status_code - filename = generate_temporary_filename() + filename => generate_temporary_filename() if(.not. associated(filename)) then status_code = STATUS_LOCALFAIL else |