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: cim by panjiam from
([email protected])
2. Linux-HA CVS: cim by panjiam from
([email protected])
3. Linux-HA CVS: include by andrew from
([email protected])
4. Linux-HA CVS: lib by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 9 May 2006 00:08:34 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : panjiam
Host :
Project : linux-ha
Module : cim
Dir : linux-ha/cim
Modified Files:
cluster_info.c
Log Message:
should not remove keywords it doesb't know
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/cluster_info.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- cluster_info.c 26 Apr 2006 08:08:38 -0000 1.9
+++ cluster_info.c 9 May 2006 06:08:34 -0000 1.10
@@ -867,10 +867,10 @@
}
}
- if ( map->entry[i].type == CMPI_chars ) {
- cl_msg_modstring(msg, directive, option);
- } else if (map->entry[i].type == CMPI_charsA) {
+ if (map->entry[i].type == CMPI_charsA) {
cl_msg_list_add_string(msg, directive, option);
+ } else {
+ cl_msg_modstring(msg, directive, option);
}
return HA_OK;
}
@@ -991,14 +991,7 @@
break;
}
}
- if ( map->entry[i].type == CMPI_chars) {
- const char *value = cl_get_string(msg, key);
- if (value && !StrIsEmpty(value)) {
- fprintf(f, "%s", (char *)key);
- FILLSPACE(f, SPACELEN - strlen(key))
- fprintf(f, "%s\n", value);
- }
- } else if (map->entry[i].type == CMPI_charsA) {
+ if (map->entry[i].type == CMPI_charsA) {
len = cl_msg_list_length(msg, key);
for (i =0; i < len; i++) {
char * value;
@@ -1009,6 +1002,13 @@
fprintf(f, "%s\n", value);
}
}
+ } else {
+ const char *value = cl_get_string(msg, key);
+ if (value && !StrIsEmpty(value)) {
+ fprintf(f, "%s", (char *)key);
+ FILLSPACE(f, SPACELEN - strlen(key))
+ fprintf(f, "%s\n", value);
+ }
}
}
------------------------------
Message: 2
Date: Tue, 9 May 2006 00:12:33 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : panjiam
Host :
Project : linux-ha
Module : cim
Dir : linux-ha/cim/tests
Modified Files:
ResourceTest.sh
Log Message:
a copy&paste error
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/tests/ResourceTest.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ResourceTest.sh 27 Apr 2006 09:20:29 -0000 1.10
+++ ResourceTest.sh 9 May 2006 06:12:32 -0000 1.11
@@ -239,7 +239,7 @@
create_attribute $RESOURCE_ID2 $ATTRIBUTE_ID2 "ip" "127.0.0.112"
cib_add_resource $RESOURCE_ID2
wait_cib_updated
-resource_query $RESOURCE_ID
+resource_query $RESOURCE_ID2
echo "---------------------------------------------------"
echo "Location Constraint creation test"
------------------------------
Message: 3
Date: Tue, 9 May 2006 00:34:06 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include
Modified Files:
ha_msg.h
Log Message:
Support a generic replace operation on HA_Message objects
Use it to preserve the internal XML ordering (which makes DTD validation
more liekly to be possible)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/ha_msg.h,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -3 -r1.80 -r1.81
--- ha_msg.h 26 Apr 2006 03:42:07 -0000 1.80
+++ ha_msg.h 9 May 2006 06:34:04 -0000 1.81
@@ -1,4 +1,4 @@
-/* $Id: ha_msg.h,v 1.80 2006/04/26 03:42:07 alan Exp $ */
+/* $Id: ha_msg.h,v 1.81 2006/05/09 06:34:04 andrew Exp $ */
/*
* Intracluster message object (struct ha_msg)
*
@@ -286,8 +286,9 @@
const struct ha_msg* value);
#define ha_msg_mod(msg, name, value) cl_msg_modstring(msg, name, value)
int cl_msg_replace(struct ha_msg* msg, int index,
- const char* value, size_t vlen, int type);
-
+ const void* value, size_t vlen, int type);
+int cl_msg_replace_value(struct ha_msg* msg, const void *old_value,
+ const void* value, size_t vlen, int type);
/* Add name, value (with known lengths) to the message */
int ha_msg_nadd(struct ha_msg * msg, const char * name, int namelen
------------------------------
Message: 4
Date: Tue, 9 May 2006 00:34:06 -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/clplumbing
Modified Files:
cl_msg.c
Log Message:
Support a generic replace operation on HA_Message objects
Use it to preserve the internal XML ordering (which makes DTD validation
more liekly to be possible)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/cl_msg.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- cl_msg.c 21 Apr 2006 07:11:42 -0000 1.103
+++ cl_msg.c 9 May 2006 06:34:05 -0000 1.104
@@ -1,4 +1,4 @@
-/* $Id: cl_msg.c,v 1.103 2006/04/21 07:11:42 andrew Exp $ */
+/* $Id: cl_msg.c,v 1.104 2006/05/09 06:34:05 andrew Exp $ */
/*
* Heartbeat messaging object.
*
@@ -1441,12 +1441,35 @@
return HA_OK;
}
+int
+cl_msg_replace_value(struct ha_msg* msg, const void *old_value,
+ const void* value, size_t vlen, int type)
+{
+ int j;
+
+ if (msg == NULL || old_value == NULL) {
+ cl_log(LOG_ERR, "cl_msg_replace: invalid argument");
+ return HA_FAIL;
+ }
+
+ for (j = 0; j < msg->nfields; ++j){
+ if (old_value == msg->values[j]){
+ break;
+ }
+ }
+ if (j == msg->nfields){
+ cl_log(LOG_ERR, "cl_msg_replace: field %p not found",
old_value);
+ return HA_FAIL;
+ }
+ return cl_msg_replace(msg, j, value, vlen, type);
+}
+
/*this function is for internal use only*/
int
cl_msg_replace(struct ha_msg* msg, int index,
- const char* value, size_t vlen, int type)
+ const void* value, size_t vlen, int type)
{
- char * newv ;
+ void * newv ;
int newlen = vlen;
int oldtype;
@@ -2456,6 +2479,11 @@
#endif
/*
* $Log: cl_msg.c,v $
+ * Revision 1.104 2006/05/09 06:34:05 andrew
+ * Support a generic replace operation on HA_Message objects
+ * Use it to preserve the internal XML ordering (which makes DTD validation
+ * more liekly to be possible)
+ *
* Revision 1.103 2006/04/21 07:11:42 andrew
* Give some indication of what we were looking for at the time
*
------------------------------
_______________________________________________
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 21
********************************************