summaryrefslogtreecommitdiff
path: root/server/monitor
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-06-23 14:57:41 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-07-02 08:59:48 -0400
commit6dc2131ab0a5225decdcdb8fff8706a340d9ed3b (patch)
tree4fa5d1c73199081dca916f0883df0200b29e62a9 /server/monitor
parentdb89f7616f3595aa2900a55039ee3b4e994eb6dc (diff)
downloadsssd-6dc2131ab0a5225decdcdb8fff8706a340d9ed3b.tar.gz
sssd-6dc2131ab0a5225decdcdb8fff8706a340d9ed3b.tar.bz2
sssd-6dc2131ab0a5225decdcdb8fff8706a340d9ed3b.zip
check pending_return after dbus_connection_send_with_reply
Diffstat (limited to 'server/monitor')
-rw-r--r--server/monitor/monitor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 2a444dc6..e4898dd5 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -462,7 +462,7 @@ static int monitor_shutdown_service(struct mt_svc *svc)
dbret = dbus_connection_send_with_reply(conn, msg, &pending_reply,
svc->mt_ctx->service_id_timeout);
- if (!dbret) {
+ if (!dbret || pending_reply == NULL) {
DEBUG(0, ("D-BUS send failed.\n"));
dbus_message_unref(msg);
monitor_kill_service(svc);
@@ -548,7 +548,7 @@ static int service_signal_reload(struct mt_svc *svc)
dbret = dbus_connection_send_with_reply(conn, msg, &pending_reply,
svc->mt_ctx->service_id_timeout);
- if (!dbret) {
+ if (!dbret || pending_reply == NULL) {
DEBUG(0, ("D-BUS send failed.\n"));
dbus_message_unref(msg);
monitor_kill_service(svc);
@@ -1602,7 +1602,7 @@ static int dbus_service_init(struct sbus_conn_ctx *conn_ctx, void *data)
}
dbret = dbus_connection_send_with_reply(conn, msg, &pending_reply,
ctx->service_id_timeout);
- if (!dbret) {
+ if (!dbret || pending_reply == NULL) {
/*
* Critical Failure
* We can't communicate on this connection
@@ -1750,7 +1750,7 @@ static int service_send_ping(struct mt_svc *svc)
dbret = dbus_connection_send_with_reply(conn, msg, &pending_reply,
svc->mt_ctx->service_id_timeout);
- if (!dbret) {
+ if (!dbret || pending_reply == NULL) {
/*
* Critical Failure
* We can't communicate on this connection