Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: crm by andrew from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 7 Apr 2006 08:28:13 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/pengine
Modified Files:
incarnation.c group.c graph.c
Log Message:
Fix some issues raised by Coverity
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- incarnation.c 27 Mar 2006 05:44:24 -0000 1.76
+++ incarnation.c 7 Apr 2006 14:28:12 -0000 1.77
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.76 2006/03/27 05:44:24 andrew Exp $ */
+/* $Id: incarnation.c,v 1.77 2006/04/07 14:28:12 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -881,15 +881,12 @@
resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint)
{
clone_variant_data_t *clone_data = NULL;
+ CRM_CHECK(rsc_lh != NULL, return);
CRM_CHECK(rsc_lh->variant == pe_native, return);
crm_debug_3("Processing RH of constraint %s", constraint->id);
- if(rsc_lh == NULL) {
- pe_err("rsc_lh was NULL for %s", constraint->id);
- return;
-
- } else if(rsc_rh == NULL) {
+ if(rsc_rh == NULL) {
pe_err("rsc_rh was NULL for %s", constraint->id);
return;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/group.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- group.c 27 Mar 2006 09:56:16 -0000 1.57
+++ group.c 7 Apr 2006 14:28:12 -0000 1.58
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.57 2006/03/27 09:56:16 andrew Exp $ */
+/* $Id: group.c,v 1.58 2006/04/07 14:28:12 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -48,6 +48,7 @@
#define get_group_variant_data(data, rsc) \
+ CRM_ASSERT(rsc != NULL); \
CRM_ASSERT(rsc->variant == pe_group); \
CRM_ASSERT(rsc->variant_opaque != NULL); \
data = (group_variant_data_t *)rsc->variant_opaque; \
@@ -462,11 +463,8 @@
crm_debug_3("Processing actions from %s", group_data->self->id);
+ CRM_CHECK(group_data->self != NULL, return);
group_data->self->fns->expand(group_data->self, data_set);
-
- if(group_data->self == NULL) {
- return;
- }
slist_iter(
child_rsc, resource_t, group_data->child_list, lpc,
@@ -540,6 +538,7 @@
void group_free(resource_t *rsc)
{
group_variant_data_t *group_data = NULL;
+ CRM_CHECK(rsc != NULL, return);
get_group_variant_data(group_data, rsc);
crm_debug_3("Freeing %s", rsc->id);
@@ -554,8 +553,8 @@
crm_debug_3("Freeing child list");
pe_free_shallow_adv(group_data->child_list, FALSE);
- free_xml(group_data->self->xml);
if(group_data->self != NULL) {
+ free_xml(group_data->self->xml);
group_data->self->fns->free(group_data->self);
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- graph.c 27 Mar 2006 05:44:24 -0000 1.78
+++ graph.c 7 Apr 2006 14:28:12 -0000 1.79
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.78 2006/03/27 05:44:24 andrew Exp $ */
+/* $Id: graph.c,v 1.79 2006/04/07 14:28:12 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -423,13 +423,12 @@
static gboolean
should_dump_action(action_t *action)
{
- const char * interval = g_hash_table_lookup(action->extra, "interval");
-
- if(action == NULL) {
- pe_err("Cannot dump NULL action");
- return FALSE;
+ const char * interval = NULL;
+
+ CRM_CHECK(action != NULL, return FALSE);
- } else if(action->optional) {
+ interval = g_hash_table_lookup(action->extra, "interval");
+ if(action->optional) {
crm_debug_5("action %d was optional", action->id);
return FALSE;
------------------------------
Message: 2
Date: Fri, 7 Apr 2006 08:28:13 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
join_dc.c
Log Message:
Fix some issues raised by Coverity
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_dc.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- join_dc.c 23 Feb 2006 11:16:05 -0000 1.85
+++ join_dc.c 7 Apr 2006 14:28:12 -0000 1.86
@@ -166,7 +166,6 @@
fsa_data_t *msg_data)
{
oc_node_t member;
- gpointer a_node = NULL;
ha_msg_input_t *welcome = fsa_typed_data(fsa_dt_ha_msg);
const char *join_to = NULL;
@@ -177,7 +176,7 @@
}
join_to = cl_get_string(welcome->msg, F_CRM_HOST_FROM);
- if(a_node != NULL
+ if(join_to != NULL
&& (cur_state == S_INTEGRATION || cur_state == S_FINALIZE_JOIN)) {
/* note: it _is_ possible that a node will have been
* sick or starting up when the original offer was made.
------------------------------
Message: 3
Date: Fri, 7 Apr 2006 08:29:33 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/admin
Modified Files:
crm_attribute.c
Log Message:
Let the CIB fill in defaults (if required)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_attribute.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- crm_attribute.c 5 Apr 2006 13:14:05 -0000 1.11
+++ crm_attribute.c 7 Apr 2006 14:29:32 -0000 1.12
@@ -1,4 +1,4 @@
-/* $Id: crm_attribute.c,v 1.11 2006/04/05 13:14:05 lars Exp $ */
+/* $Id: crm_attribute.c,v 1.12 2006/04/07 14:29:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -161,9 +161,6 @@
case 'n':
crm_debug_2("Option %c => %s", flag, optarg);
attr_name = crm_strdup(optarg);
- if(attr_id == NULL) {
- attr_id = crm_strdup(optarg);
- }
break;
case 'i':
crm_debug_2("Option %c => %s", flag, optarg);
------------------------------
Message: 4
Date: Fri, 7 Apr 2006 08:30:05 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/cib
Modified Files:
io.c
Log Message:
Revert the CIB if DTD validation fails
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- io.c 6 Apr 2006 13:28:03 -0000 1.61
+++ io.c 7 Apr 2006 14:30:05 -0000 1.62
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.61 2006/04/06 13:28:03 andrew Exp $ */
+/* $Id: io.c,v 1.62 2006/04/07 14:30:05 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -497,10 +497,14 @@
new_cib, HA_LIBDIR"/heartbeat/crm.dtd") == FALSE) {
error_code = cib_dtd_validation;
crm_err("Ignoring invalid CIB");
+ }
- } else if (initializeCib(new_cib) == FALSE) {
+ if(error_code == cib_ok && initializeCib(new_cib) == FALSE) {
error_code = cib_ACTIVATION;
crm_err("Ignoring invalid or NULL CIB");
+ }
+
+ if(error_code != cib_ok) {
if(saved_cib != NULL) {
crm_warn("Reverting to last known CIB");
if (initializeCib(saved_cib) == FALSE) {
@@ -514,7 +518,7 @@
crm_crit("Could not write out new CIB and no saved"
" version to revert to");
}
-
+
} else if(cib_writes_enabled) {
crm_debug_2("Triggering CIB write");
G_main_set_trigger(cib_writer);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 37
********************************************