[Libreoffice-commits] core.git: 4 commits - configure.ac sd/CppunitTest_sd_uimpress.mk sd/Library_sd.mk sd/source
Tor Lillqvist
tml at iki.fi
Thu Jul 25 11:27:00 PDT 2013
configure.ac | 6 +++---
sd/CppunitTest_sd_uimpress.mk | 22 ++++------------------
sd/Library_sd.mk | 2 +-
sd/source/ui/remotecontrol/DiscoveryService.cxx | 13 ++++++++-----
4 files changed, 16 insertions(+), 27 deletions(-)
New commits:
commit c3b55c51a911883052b4e62cb9af3eb3cabd85a9
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Jul 25 21:26:07 2013 +0300
Disable use of Avahi by default for now until it doesn't break tinderboxes
Change-Id: Ibb8b40e5e853e29b26b96018f4248321dd841985
diff --git a/configure.ac b/configure.ac
index 1a65c0a..eb6c160 100644
--- a/configure.ac
+++ b/configure.ac
@@ -800,9 +800,9 @@ AC_ARG_ENABLE(atl,
,)
AC_ARG_ENABLE(avahi,
- AS_HELP_STRING([--disable-avahi],
- [Determines whether to use the avahi support for impress remote zeroconf.]),
-,enable_avahi=yes)
+ AS_HELP_STRING([--enable-avahi],
+ [Determines whether to use Avahi to advertise Impress to remote controls.]),
+,)
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror],
commit c852fa1121d652ab74ba692c7ba0fb2b9ced5333
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Jul 25 21:24:23 2013 +0300
Simplify and fix Avahi conditionals
Change-Id: Ied30c619804239044b935382d580dcb86bfb8b11
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index af4b821..f17a2d7 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -71,28 +71,14 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sd_uimpress,\
))
endif
-ifeq ($(OS), LINUX)
-ifeq ($(ENABLE_AVAHI),TRUE)
-$(eval $(call gb_Library_use_externals,sd,\
- boost_headers \
- gtk \
- dbus \
- avahi \
-))
-else
-$(eval $(call gb_Library_use_externals,sd,\
+$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\
boost_headers \
gtk \
dbus \
+ $(if $(ENABLE_AVAHI), \
+ avahi \
+ ) \
))
-endif
-else
-$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\
- boost_headers \
- gtk \
- dbus \
-))
-endif
$(eval $(call gb_CppunitTest_add_exception_objects,sd_uimpress,\
sd/qa/unit/uimpress \
commit 4acf41db11a1791c3705712f8a66a1e85094f83d
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Jul 25 21:23:55 2013 +0300
Compile AvahiNetworkService.cxx only if Avahi is enabled
Change-Id: Id5db47f9a7dc1d05f5e100b8367ba75ddd1f6dc8
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 21a4ab8..807926f 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -549,7 +549,7 @@ $(eval $(call gb_Library_add_objcxxobjects,sd,\
else
-ifeq ($(OS),LINUX)
+ifeq ($(ENABLE_AVAHI),TRUE)
$(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/remotecontrol/AvahiNetworkService \
))
commit a7be6a2e89960e753c4ea1d58ded61a99f028fa8
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Jul 25 21:23:19 2013 +0300
Don't use zService if not set
Change-Id: I1043ab54cbffddd316d141e3f5d368849e3070ca
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 1b2db77..62c3e6e 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -53,22 +53,24 @@ using namespace sd;
DiscoveryService::DiscoveryService()
{
+ zService = NULL;
+
#ifdef MACOSX
// Bonjour for OSX
zService = new OSXNetworkService();
#endif
-#ifdef LINUX
- #ifdef ENABLE_AVAHI
+
+#ifdef ENABLE_AVAHI
// Avahi for Linux
char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
zService = new AvahiNetworkService(hostname);
- #endif
#endif
- zService->setup();
+ if (zService)
+ zService->setup();
// Old implementation for backward compatibility matter
mSocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
@@ -113,7 +115,8 @@ DiscoveryService::~DiscoveryService()
close( mSocket );
#endif
- zService->clear();
+ if (zService)
+ zService->clear();
}
void SAL_CALL DiscoveryService::run()
More information about the Libreoffice-commits
mailing list