Recognize "--compress lzo" option as legal
This commit is contained in:
parent
a06a4fef9b
commit
9a6f3d638c
|
@ -315,10 +315,17 @@ public class ConfigurationParser {
|
|||
isHandled = true
|
||||
compressionFraming = .compress
|
||||
|
||||
guard $0.isEmpty else {
|
||||
compressionAlgorithm = .other
|
||||
unsupportedError = .unsupportedConfiguration(option: line)
|
||||
return
|
||||
if !LZOIsSupported() {
|
||||
guard $0.isEmpty else {
|
||||
unsupportedError = .unsupportedConfiguration(option: line)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if let arg = $0.first {
|
||||
compressionAlgorithm = (arg == "lzo") ? .LZO : .other
|
||||
} else {
|
||||
compressionAlgorithm = .disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
Regex.keyDirection.enumerateArguments(in: line) {
|
||||
|
|
|
@ -395,18 +395,20 @@ extension SessionProxy {
|
|||
switch $0[0] {
|
||||
case "comp-lzo":
|
||||
compressionFraming = .compLZO
|
||||
if !(($0.count == 2) && ($0[1] == "no")) {
|
||||
compressionAlgorithm = .LZO
|
||||
} else {
|
||||
if ($0.count == 2) && ($0[1] == "no") {
|
||||
compressionAlgorithm = .disabled
|
||||
} else {
|
||||
compressionAlgorithm = .LZO
|
||||
}
|
||||
|
||||
case "compress":
|
||||
compressionFraming = .compress
|
||||
if $0.count > 1 {
|
||||
compressionAlgorithm = .other
|
||||
} else {
|
||||
if $0.count == 1 {
|
||||
compressionAlgorithm = .disabled
|
||||
} else if ($0.count == 2) && ($0[1] == "lzo") {
|
||||
compressionAlgorithm = .LZO
|
||||
} else {
|
||||
compressionAlgorithm = .other
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue