From 016d6d047beee7425e01fb2fbfce04aa28238b34 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 16 May 2022 05:36:10 +0300 Subject: [PATCH] kdirshare: the Avahi limit for service names is 64 Signed-off-by: Ivailo Monev --- kdirshare/kded/kdirshareimpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdirshare/kded/kdirshareimpl.cpp b/kdirshare/kded/kdirshareimpl.cpp index db0a0b35..618b6766 100644 --- a/kdirshare/kded/kdirshareimpl.cpp +++ b/kdirshare/kded/kdirshareimpl.cpp @@ -30,8 +30,8 @@ static const QDir::SortFlags s_dirsortflags = (QDir::Name | QDir::DirsFirst); static const QByteArray s_data404("404 Not Found"); static const QByteArray s_data500("500 Internal Server Error"); -// TODO: figure out what the Avahi limit is -static const int s_sharenamelimit = 40; +// AVAHI_LABEL_MAX - 3 (for dots) - 1 (for null terminator) +static const int s_sharenamelimit = 60; static QString getShareName(const QString &dirpath) { -- 2.11.0