From 5502ef270bcb09927dec9497dda208b53cefcc86fa76fc90f3ffeaea8ad79316 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 24 Mar 2011 12:21:14 +0000 Subject: [PATCH] convert to branch OBS-URL: https://build.opensuse.org/package/show/games:tools/mumble?expand=0&rev=10 --- ...e-is-empty-don-t-pass-an-empty-string.diff | 28 +++++++++++++++++ ...al-host-name-instead-of-qsRegName-via.diff | 31 ------------------- mumble.spec | 2 +- 3 files changed, 29 insertions(+), 32 deletions(-) create mode 100644 0001-if-service-name-is-empty-don-t-pass-an-empty-string.diff delete mode 100644 0001-register-the-local-host-name-instead-of-qsRegName-via.diff diff --git a/0001-if-service-name-is-empty-don-t-pass-an-empty-string.diff b/0001-if-service-name-is-empty-don-t-pass-an-empty-string.diff new file mode 100644 index 0000000..583fc62 --- /dev/null +++ b/0001-if-service-name-is-empty-don-t-pass-an-empty-string.diff @@ -0,0 +1,28 @@ +From d2a97b874e55ad156781a2762ff32ae9566de495 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Thu, 24 Mar 2011 09:04:53 +0100 +Subject: [PATCH mumble] if service name is empty don't pass an empty string + +DNSServiceRegister uses the local host name if the name is NULL but does nothing if it's empty +--- + src/bonjour/bonjourserviceregister.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/bonjour/bonjourserviceregister.cpp b/src/bonjour/bonjourserviceregister.cpp +index a818d8c..5f82779 100644 +--- a/src/bonjour/bonjourserviceregister.cpp ++++ b/src/bonjour/bonjourserviceregister.cpp +@@ -53,7 +53,9 @@ void BonjourServiceRegister::registerService(const BonjourRecord &record, quint1 + } + #endif + +- DNSServiceErrorType err = DNSServiceRegister(&dnssref, 0, 0, record.serviceName.toUtf8().constData(), ++ DNSServiceErrorType err = DNSServiceRegister(&dnssref, 0, 0, ++ record.serviceName.isEmpty() ? 0 ++ : record.serviceName.toUtf8().constData(), + record.registeredType.toUtf8().constData(), + record.replyDomain.isEmpty() ? 0 + : record.replyDomain.toUtf8().constData(), 0, +-- +1.7.3.4 + diff --git a/0001-register-the-local-host-name-instead-of-qsRegName-via.diff b/0001-register-the-local-host-name-instead-of-qsRegName-via.diff deleted file mode 100644 index 19f489a..0000000 --- a/0001-register-the-local-host-name-instead-of-qsRegName-via.diff +++ /dev/null @@ -1,31 +0,0 @@ -From e05c7781954601d81da1770235d99e5f25b85393 Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Wed, 23 Mar 2011 18:23:47 +0100 -Subject: [PATCH mumble] register the local host name instead of qsRegName via bonjour - -no qsRegName means not registering via bonjour. Setting qsRegName -causes a warning wrt public registration. So just use the local host -name instead. ---- - src/murmur/Server.cpp | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp -index d173e9e..b52d576 100644 ---- a/src/murmur/Server.cpp -+++ b/src/murmur/Server.cpp -@@ -467,8 +467,9 @@ void Server::setLiveConf(const QString &key, const QString &value) { - void Server::initBonjour() { - bsRegistration = new BonjourServer(); - if (bsRegistration->bsrRegister) { -- log("Announcing server via bonjour"); -- bsRegistration->bsrRegister->registerService(BonjourRecord(qsRegName, "_mumble._tcp", ""), -+ QString name = QHostInfo::localHostName(); -+ log(QString("Announcing %1 via bonjour").arg(name)); -+ bsRegistration->bsrRegister->registerService(BonjourRecord(name, "_mumble._tcp", ""), - usPort); - } - } --- -1.7.3.4 - diff --git a/mumble.spec b/mumble.spec index aa1fa42..a593b2c 100644 --- a/mumble.spec +++ b/mumble.spec @@ -81,7 +81,7 @@ Source2: mumble-server.init Patch0: 0001-fix-build-error-with-capability.h.diff Patch1: 0001-fix-user-switching.diff Patch2: 0001-open-log-file-early-so-log-dir-can-be-root-owned.diff -Patch3: 0001-register-the-local-host-name-instead-of-qsRegName-via.diff +Patch3: 0001-if-service-name-is-empty-don-t-pass-an-empty-string.diff Patch50: mumble-1.2.2-buildcompare.diff # hack, no clue about glx so no idea to fix this properly Patch99: mumble-1.1.4-sle10glx.diff