From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci configure make/defines.mk.in ricci ...
Date: 25 Jul 2006 19:10:19 -0000 [thread overview]
Message-ID: <20060725191019.5091.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-07-25 19:10:19
Modified files:
ricci : configure
ricci/make : defines.mk.in
ricci/ricci : DBusController.cpp Makefile
Log message:
ricci: D-BUS API changed. DBusController.cpp uses different APIs based on detected d-bus version.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/configure.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/make/defines.mk.in.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/DBusController.cpp.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13
--- conga/ricci/configure 2006/06/16 20:44:15 1.4
+++ conga/ricci/configure 2006/07/25 19:10:18 1.5
@@ -44,9 +44,25 @@
fi
+# D-BUS version
+DBUS_VERSION=`dbus-launch --version | grep D-BUS | sed -e s,^D-BUS\ Message\ Bus\ Launcher\ \\\\\([012]\.[0123456789]*\\\\\),\\\1,`
+if [ -z "$DBUS_VERSION" ] ; then
+ echo "missing d-bus"
+ rm -f $MAKE_DEFINES
+ exit 1
+else
+ echo "detected dbus version: $DBUS_VERSION"
+ DBUS_MAJOR_VERSION=`echo $DBUS_VERSION | sed -e s,^\\\\\([012]\\\\\)\.[0123456789]*,\\\1,`
+ DBUS_MINOR_VERSION=`echo $DBUS_VERSION | sed -e s,^[012]\.\\\\\([0123456789]*\\\\\),\\\1,`
+fi
+
+
cat $MAKE_DEFINES.in \
| sed -e s,@@LIBDIR@@,$LIBDIR_SED,g \
| sed -e s,@@ARCH@@,$ARCH,g \
+ | sed -e s,@@DBUS_VERSION@@,$DBUS_VERSION,g \
+ | sed -e s,@@DBUS_MAJOR_VERSION@@,$DBUS_MAJOR_VERSION,g \
+ | sed -e s,@@DBUS_MINOR_VERSION@@,$DBUS_MINOR_VERSION,g \
| sed -e s,@@PEGASUS_PLATFORM@@,$PEGASUS_PLATFORM,g \
>> $MAKE_DEFINES
--- conga/ricci/make/defines.mk.in 2006/06/30 22:26:12 1.4
+++ conga/ricci/make/defines.mk.in 2006/07/25 19:10:18 1.5
@@ -17,6 +17,9 @@
docdir ?= ${datadir}/doc
arch ?= @@ARCH@@
pegasus_providers_dir ?= ${libdir}/Pegasus/providers
+dbus_version ?= @@DBUS_VERSION@@
+dbus_major_version ?= @@DBUS_MAJOR_VERSION@@
+dbus_minor_version ?= @@DBUS_MINOR_VERSION@@
#--build=i686-redhat-linux-gnu
--- conga/ricci/ricci/DBusController.cpp 2006/06/15 03:08:37 1.11
+++ conga/ricci/ricci/DBusController.cpp 2006/07/25 19:10:18 1.12
@@ -106,8 +106,13 @@
MutexLocker lock(_dbus_mutex);
if (--_object_counter == 0) {
- // dbus_connection_close(_dbus_conn);
- dbus_connection_disconnect(_dbus_conn); // old version
+#if (DBUS_MAJOR_VERSION == 1) || (DBUS_MAJOR_VERSION == 0 && DBUS_MINOR_VERSION >= 90)
+ dbus_connection_close(_dbus_conn);
+#elif DBUS_MAJOR_VERSION == 0 && DBUS_MINOR_VERSION < 90
+ dbus_connection_disconnect(_dbus_conn);
+#else
+#error "unrecognized major DBUS number"
+#endif
dbus_connection_unref(_dbus_conn);
_dbus_conn = 0;
}
--- conga/ricci/ricci/Makefile 2006/06/30 22:26:13 1.12
+++ conga/ricci/ricci/Makefile 2006/07/25 19:10:18 1.13
@@ -40,7 +40,7 @@
INCLUDE += -I ${includedir}/dbus-1.0 -I ${libdir}/dbus-1.0/include
CFLAGS +=
-CXXFLAGS +=
+CXXFLAGS += -DDBUS_MAJOR_VERSION="${dbus_major_version}" -DDBUS_MINOR_VERSION="${dbus_minor_version}"
LDFLAGS += -l dbus-1
reply other threads:[~2006-07-25 19:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060725191019.5091.qmail@sourceware.org \
--to=kupcevic@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.