aboutsummaryrefslogtreecommitdiff
path: root/protocol.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-06-18 20:05:37 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-06-18 20:05:37 -0400
commit2e87199d7b27f8e2ca03ccbf13cfa01fc23d2865 (patch)
treebbce1c1c56dc53245f96173301789114bb4ec247 /protocol.f90
parent42bdfe78ed03e1ba4355edcac43ad2217631ce05 (diff)
downloadLR-87-2e87199d7b27f8e2ca03ccbf13cfa01fc23d2865.zip
LR-87-2e87199d7b27f8e2ca03ccbf13cfa01fc23d2865.tar.gz
Improved line wrapping calcs to search for break from beginning of string. Fixed unnecessary connection error when reporting unsupported protocol by adding a protocol fail status.
Diffstat (limited to 'protocol.f90')
-rw-r--r--protocol.f9026
1 files changed, 16 insertions, 10 deletions
diff --git a/protocol.f90 b/protocol.f90
index adb3760..613ca9f 100644
--- a/protocol.f90
+++ b/protocol.f90
@@ -23,15 +23,16 @@
module gemini_protocol
implicit none
- integer, parameter::STATUS_INPUT = 1
- integer, parameter::STATUS_SUCCESS = 2
- integer, parameter::STATUS_REDIRECT = 3
- integer, parameter::STATUS_TEMPFAIL = 4
- integer, parameter::STATUS_PERMFAIL = 5
- integer, parameter::STATUS_CERTREQ = 6
- integer, parameter::STATUS_BADRESPONSE = 7
- integer, parameter::STATUS_LOCALFAIL = -1
- integer, parameter::STATUS_CONNECTFAIL = -2
+ integer, parameter::STATUS_INPUT = 1
+ integer, parameter::STATUS_SUCCESS = 2
+ integer, parameter::STATUS_REDIRECT = 3
+ integer, parameter::STATUS_TEMPFAIL = 4
+ integer, parameter::STATUS_PERMFAIL = 5
+ integer, parameter::STATUS_CERTREQ = 6
+ integer, parameter::STATUS_BADRESPONSE = 7
+ integer, parameter::STATUS_LOCALFAIL = -1
+ integer, parameter::STATUS_CONNECTFAIL = -2
+ integer, parameter::STATUS_PROTOCOLFAIL = -3
integer, parameter::BUFFER_SIZE = 256
@@ -46,7 +47,12 @@ contains
logical::is_failure_code
is_failure_code = any(return_code == &
- [STATUS_CONNECTFAIL, STATUS_LOCALFAIL, STATUS_BADRESPONSE, STATUS_PERMFAIL, STATUS_TEMPFAIL])
+ [STATUS_CONNECTFAIL, &
+ STATUS_LOCALFAIL, &
+ STATUS_BADRESPONSE, &
+ STATUS_PERMFAIL, &
+ STATUS_TEMPFAIL, &
+ STATUS_PROTOCOLFAIL])
end function is_failure_code