Recognize "--compress lzo" option as legal
This commit is contained in:
parent
a06a4fef9b
commit
9a6f3d638c
|
@ -315,11 +315,18 @@ public class ConfigurationParser {
|
|||
isHandled = true
|
||||
compressionFraming = .compress
|
||||
|
||||
if !LZOIsSupported() {
|
||||
guard $0.isEmpty else {
|
||||
compressionAlgorithm = .other
|
||||
unsupportedError = .unsupportedConfiguration(option: line)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if let arg = $0.first {
|
||||
compressionAlgorithm = (arg == "lzo") ? .LZO : .other
|
||||
} else {
|
||||
compressionAlgorithm = .disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
Regex.keyDirection.enumerateArguments(in: line) {
|
||||
isHandled = true
|
||||
|
|
|
@ -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