From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Thu, 3 Feb 2011 12:43:08 -0500 Subject: [Cluster-devel] [PATCH] fenced: send dbus signal when node is fenced In-Reply-To: <1296686142-22696-1-git-send-email-rohara@redhat.com> References: <1296686142-22696-1-git-send-email-rohara@redhat.com> Message-ID: <20110203174308.GA15430@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > +void dbus_init (void) No space before ( Also, it would be a good idea to put a fenced-specific prefix before fenced's own dbus functions, e.g. fd_dbus_init(), because dbus_ is the dbus lib's namespace and open to symbol collisions. > +{ > +#ifdef DBUS > + > + if (!(bus = dbus_bus_get_private (DBUS_BUS_SYSTEM, NULL))) { > + log_error ("failed to get dbus connection"); > + } else { > + log_debug ("connected to dbus %s", dbus_bus_get_unique_name (bus)); > + } > + > +#endif > + > + return; > +} It may be neater to put all of these functions under a single #ifdef DBUS and then add empty stubs in an #else. > +#ifdef DBUS > +#include > +#endif could that go in dbus.c? > + if (!optd_disable_dbus) { > + dbus_init(); In this case, the optd/cfgd pair is redundant, but technically this should be testing the cfgd_disable_dbus value (the optd just indicates if the option has been set on the command line).