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: lib by andrew from
([email protected])
3. Linux-HA CVS: lib by lars from ([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 May 2006 05:53:54 -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 messages.c
Log Message:
Remove redundant use of sizeif(char)... ISO C specifies that sizeof(char) := 1
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- io.c 15 May 2006 10:21:04 -0000 1.67
+++ io.c 29 May 2006 11:53:53 -0000 1.68
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.67 2006/05/15 10:21:04 andrew Exp $ */
+/* $Id: io.c,v 1.68 2006/05/29 11:53:53 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -120,8 +120,8 @@
CRM_ASSERT(start == ftell(expected_strm));
crm_debug_3("Reading %d bytes from file", length);
- crm_malloc0(expected, sizeof(char) * (length+1));
- read_len = fread(expected, sizeof(char), length, expected_strm);
+ crm_malloc0(expected, (length+1));
+ read_len = fread(expected, 1, length, expected_strm);
CRM_ASSERT(read_len == length);
if(expected == NULL) {
@@ -454,7 +454,7 @@
} else {
int max_name_len = 1024;
- crm_malloc0(backup_file, sizeof(char) * max_name_len);
+ crm_malloc0(backup_file, max_name_len);
if (ext == NULL) {
ext = back_ext;
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/messages.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- messages.c 15 May 2006 09:30:00 -0000 1.78
+++ messages.c 29 May 2006 11:53:53 -0000 1.79
@@ -1,4 +1,4 @@
-/* $Id: messages.c,v 1.78 2006/05/15 09:30:00 andrew Exp $ */
+/* $Id: messages.c,v 1.79 2006/05/29 11:53:53 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -292,7 +292,7 @@
old_value = crm_element_value_copy(xml_obj, field);
}
if(old_value != NULL) {
- crm_malloc0(new_value, 128*(sizeof(char)));
+ crm_malloc0(new_value, 128);
int_value = atoi(old_value);
sprintf(new_value, "%d", ++int_value);
} else {
------------------------------
Message: 2
Date: Mon, 29 May 2006 05:55:54 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/lrm
Modified Files:
lrm_msg.c
Log Message:
Fix for OSDL #1273
This patch reverses the copy order for better performance and never
(re)populates the hashtable with attributes starting with "CRM_meta_"
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/lrm/lrm_msg.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- lrm_msg.c 2 Jun 2005 01:07:33 -0000 1.25
+++ lrm_msg.c 29 May 2006 11:55:53 -0000 1.26
@@ -1,4 +1,4 @@
-/* $Id: lrm_msg.c,v 1.25 2005/06/02 01:07:33 zhenh Exp $ */
+/* $Id: lrm_msg.c,v 1.26 2006/05/29 11:55:53 andrew Exp $ */
/*
* Message Functions For Local Resource Manager
*
@@ -59,31 +59,31 @@
static void
merge_pair(gpointer key, gpointer value, gpointer user_data)
{
- gpointer oldvalue;
- gpointer oldkey;
- GHashTable* ret = (GHashTable*)user_data;
-
- if (g_hash_table_lookup_extended(ret, key, &oldkey, &oldvalue)){
- g_hash_table_remove(ret, oldkey);
- g_free(oldvalue);
- g_free(oldkey);
- }
- g_hash_table_insert(ret, g_strdup(key), g_strdup(value));
+ GHashTable *merged = (GHashTable*)user_data;
+
+ if (g_hash_table_lookup(merged, key)) {
+ return;
+
+ } else if(strncmp(key, "CRM_meta_" /*CRM_META*/, 9) == 0) {
+ /* Never repopulate CRM meta attributes */
+ return;
+ }
+ g_hash_table_insert(merged, g_strdup(key), g_strdup(value));
}
GHashTable*
merge_str_tables(GHashTable* old, GHashTable* new)
{
- GHashTable* ret = NULL;
+ GHashTable* merged = NULL;
if ( NULL == old ) {
return copy_str_table(new);
}
if ( NULL == new ) {
return copy_str_table(old);
}
- ret = copy_str_table(old);
- g_hash_table_foreach(new, merge_pair, ret);
- return ret;
+ merged = copy_str_table(new);
+ g_hash_table_foreach(old, merge_pair, merged);
+ return merged;
}
static gboolean
@@ -217,6 +217,11 @@
/*
* $Log: lrm_msg.c,v $
+ * Revision 1.26 2006/05/29 11:55:53 andrew
+ * Fix for OSDL #1273
+ * This patch reverses the copy order for better performance and never
+ * (re)populates the hashtable with attributes starting with "CRM_meta_"
+ *
* Revision 1.25 2005/06/02 01:07:33 zhenh
* 1. improve some names of internal functions.
* 2. remove the useless "unregister" message.
------------------------------
Message: 3
Date: Mon, 29 May 2006 07:07:14 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by lars from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : lars
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/fencing
Modified Files:
stonithd_lib.c
Log Message:
Upgrade messages in error legs from DEBUG to ERR.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/fencing/stonithd_lib.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- stonithd_lib.c 9 Nov 2005 08:12:16 -0000 1.20
+++ stonithd_lib.c 29 May 2006 13:07:13 -0000 1.21
@@ -328,11 +328,11 @@
rc = ST_OK;
stdlib_log(LOG_DEBUG, "stonith msg is sent to
stonithd.");
} else {
- stdlib_log(LOG_DEBUG, "failed to send stonith request
to "
+ stdlib_log(LOG_ERR, "failed to send stonith request to "
"the stonithd.");
}
} else {
- stdlib_log(LOG_DEBUG, "stonithd_node_fence: "
+ stdlib_log(LOG_ERR, "stonithd_node_fence: "
"Got an unexpected message.");
/* Need to handle in other way? */
}
------------------------------
Message: 4
Date: Mon, 29 May 2006 07:18:03 -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:
crmadmin.c
Log Message:
No point waiting for the hello message... we dont care
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crmadmin.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- crmadmin.c 29 May 2006 11:53:53 -0000 1.70
+++ crmadmin.c 29 May 2006 13:18:03 -0000 1.71
@@ -1,4 +1,4 @@
-/* $Id: crmadmin.c,v 1.70 2006/05/29 11:53:53 andrew Exp $ */
+/* $Id: crmadmin.c,v 1.71 2006/05/29 13:18:03 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -275,19 +275,14 @@
hb_cluster = do_init();
if (hb_cluster != NULL) {
int res = do_work(hb_cluster);
- if (res >= 0) {
+ if(res == 0) {
+ } else if (res > 0) {
/* wait for the reply by creating a mainloop and
running it until
* the callbacks are invoked...
*/
mainloop = g_main_new(FALSE);
expected_responses++;
- if(res == 0) {
- crm_debug_2("no reply expected,"
- " wait for the hello message only");
-
- } else {
- crm_debug_2("Waiting for reply from the local
CRM");
- }
+ crm_debug_2("Waiting for reply from the local CRM");
message_timer_id = Gmain_timeout_add(
message_timeout_ms, admin_message_timeout,
NULL);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 30, Issue 95
********************************************