forked from External/ergo
increase max cap line length
Workaround for #661: this makes the `CAP LS 302` line from the default config fit on a single line, as long as the server name is at most 35 characters.
This commit is contained in:
parent
a75d26a46b
commit
ae9aecbbb0
4 changed files with 20 additions and 12 deletions
|
|
@ -89,12 +89,15 @@ func (s *Set) Empty() bool {
|
|||
return utils.BitsetEmpty(s[:])
|
||||
}
|
||||
|
||||
const maxPayloadLength = 440
|
||||
const defaultMaxPayloadLength = 450
|
||||
|
||||
// Strings returns all of our enabled capabilities as a slice of strings.
|
||||
func (s *Set) Strings(version Version, values Values) (result []string) {
|
||||
func (s *Set) Strings(version Version, values Values, maxLen int) (result []string) {
|
||||
if maxLen == 0 {
|
||||
maxLen = defaultMaxPayloadLength
|
||||
}
|
||||
var t utils.TokenLineBuilder
|
||||
t.Initialize(maxPayloadLength, " ")
|
||||
t.Initialize(maxLen, " ")
|
||||
|
||||
var capab Capability
|
||||
asSlice := s[:]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue