Ticket #10773: bonjour-correction.patch

File bonjour-correction.patch, 1.3 KB (added by George Nassas <gnassas@…>, 13 years ago)
  • mythtv/programs/mythbackend/mediaserver.cpp

    From 8929314e77dfc5fe9bcc58f4ace4e7ba6fea9bef Mon Sep 17 00:00:00 2001
    From: George Nassas <george@nassas.com>
    Date: Tue, 29 May 2012 10:11:38 -0400
    Subject: [PATCH] make backend's bonjour service name dns-compliant
    
    ---
     mythtv/programs/mythbackend/mediaserver.cpp |    7 ++-----
     1 files changed, 2 insertions(+), 5 deletions(-)
    
    diff --git a/mythtv/programs/mythbackend/mediaserver.cpp b/mythtv/programs/mythbackend/mediaserver.cpp
    index 043140d..19d0eb9 100644
    a b void MediaServer::Init(bool bIsMaster, bool bDisableUPnp /* = false */) 
    256256        m_bonjour = new BonjourRegister();
    257257        if (m_bonjour)
    258258        {
    259             QByteArray dummy;
    260259            QByteArray name("Mythbackend on ");
    261260            name.append(gCoreContext->GetHostName());
    262             m_bonjour->Register(nPort,
    263                                 bIsMaster ? "_mythbackend-master._tcp" :
    264                                             "_mythbackend-slave._tcp",
    265                                 name, dummy);
     261            QByteArray txt(bIsMaster ? "\x0Clevel=master" : "\x0Blevel=slave");
     262            m_bonjour->Register(nPort, "_mythbackend._tcp", name, txt);
    266263        }
    267264#endif
    268265    }