From 802916ee3fb75e7eeb988bb382ccd51a8c36c732 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sun, 12 Oct 2014 19:42:00 +0200 Subject: [PATCH] Post also information about language preferences ar log in --- vompclientrrproc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vompclientrrproc.c b/vompclientrrproc.c index d342b3a..1de40e2 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -337,6 +337,7 @@ bool VompClientRRProc::processPacket() return false; } + int VompClientRRProc::processLogin() { if (req->dataLength != 6) return 0; @@ -357,6 +358,16 @@ int VompClientRRProc::processLogin() resp->addLONG(timeOffset); resp->addULONG(VOMP_PROTOCOL_VERSION_MIN); resp->addULONG(VOMP_PROTOCOL_VERSION_MAX); + + // also send information about languages + resp->addULONG(I18nLanguages()->Size()); + resp->addLONG(Setup.DisplaySubtitles); + for (int i=0;i < I18nLanguages()->Size(); i++) { + resp->addLONG(Setup.AudioLanguages[i]); + resp->addLONG(Setup.SubtitleLanguages[i]); + resp->addString(I18nLanguageCode(i)); + } + resp->finalise(); x.tcp.sendPacket(resp->getPtr(), resp->getLen()); log->log("RRProc", Log::DEBUG, "written login reply len %lu", resp->getLen()); -- 2.39.5