cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] fenced: send dbus signal when node is fenced
Date: Thu, 3 Feb 2011 12:43:08 -0500	[thread overview]
Message-ID: <20110203174308.GA15430@redhat.com> (raw)
In-Reply-To: <1296686142-22696-1-git-send-email-rohara@redhat.com>

> +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 <dbus/dbus.h>
> +#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).



  parent reply	other threads:[~2011-02-03 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 22:35 [Cluster-devel] [PATCH] fenced: send dbus signal when node is fenced Ryan O'Hara
2011-02-02 22:56 ` Lon Hohberger
2011-02-02 23:30   ` Lon Hohberger
2011-02-03  6:24 ` Fabio M. Di Nitto
2011-02-03 14:53   ` Ryan O'Hara
2011-02-03 17:43 ` David Teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-03 19:26 Ryan O'Hara
2011-02-03 19:45 ` David Teigland
2011-02-02 21:28 Ryan O'Hara
2011-02-02 22:55 ` Lon Hohberger

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=20110203174308.GA15430@redhat.com \
    --to=teigland@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).