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: cts by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Fri, 20 Jan 2006 06:24:43 -0700 (MST)
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:
        callbacks.c 


Log Message:
Finally figure out why these couldnt be freed 
 - I wasnt alloating enough space at the start :(

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- callbacks.c 20 Jan 2006 09:30:37 -0000      1.95
+++ callbacks.c 20 Jan 2006 13:24:42 -0000      1.96
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.95 2006/01/20 09:30:37 andrew Exp $ */
+/* $Id: callbacks.c,v 1.96 2006/01/20 13:24:42 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -170,16 +170,15 @@
 
                } else {
                        cl_uuid_t client_id;
-
+                       char uuid_str[UU_UNPARSE_SIZEOF];
+                       
                        cl_uuid_generate(&client_id);
-                       crm_malloc0(new_client->id, sizeof(char)*36);
-                       cl_uuid_unparse(&client_id, new_client->id);
-                       new_client->id[35] = EOS;
+                       cl_uuid_unparse(&client_id, uuid_str);
+                       new_client->id = crm_strdup(uuid_str);
                        
                        cl_uuid_generate(&client_id);
-                       crm_malloc0(new_client->callback_id, sizeof(char)*36);
-                       cl_uuid_unparse(&client_id, new_client->callback_id);
-                       new_client->callback_id[35] = EOS;
+                       cl_uuid_unparse(&client_id, uuid_str);
+                       new_client->callback_id = crm_strdup(uuid_str);
                        
                        client_callback = cib_ro_callback;
                        if(safe_str_eq(new_client->channel_name, 
cib_channel_rw)) {
@@ -1144,14 +1143,15 @@
                        cib_client->source = NULL;
                }
                
-               crm_debug_3("Freeing the cib client %s",
-                           crm_str(cib_client->id));
-#if 0
-               /* todo - put this back in once i recheck its safe */
-               crm_free(cib_client->callback_id);
-               crm_free(cib_client->name);
-               crm_free(cib_client->id);
-#endif
+               crm_debug("Freeing the cib client %s : %s : %s : %p",
+                         crm_str(cib_client->id),
+                         crm_str(cib_client->name),
+                         crm_str(cib_client->callback_id),
+                         cib_client);
+               
+               crm_free(cib_client->name);
+               crm_free(cib_client->callback_id);
+               crm_free(cib_client->id);
                crm_free(cib_client);
                crm_debug_3("Freed the cib client");
 




------------------------------

Message: 2
Date: Fri, 20 Jan 2006 06:26:45 -0700 (MST)
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:
        election.c 


Log Message:
UUID Cleanup 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- election.c  10 Jan 2006 13:46:42 -0000      1.101
+++ election.c  20 Jan 2006 13:26:45 -0000      1.102
@@ -277,18 +277,17 @@
        }
 
        if(we_loose) {
+               cl_uuid_t vote_uuid_s;
                gboolean vote_sent = FALSE;
+               char vote_uuid[UU_UNPARSE_SIZEOF];
                HA_Message *novote = create_request(
                        CRM_OP_NOVOTE, NULL, vote_from,
                        CRM_SYSTEM_CRMD, CRM_SYSTEM_CRMD, NULL);
-               cl_uuid_t vote_uuid_s;
-               char *vote_uuid = NULL;
+               
                if(cl_get_uuid(vote->msg, F_ORIGUUID, &vote_uuid_s) == HA_OK) {
-                       crm_malloc0(vote_uuid, sizeof(char)*100);
                        cl_uuid_unparse(&vote_uuid_s, vote_uuid);
-               }
 
-               if(vote_uuid == NULL) {
+               } else {
                        cl_log_message(LOG_ERR, vote->msg);
                }
                
@@ -310,7 +309,6 @@
                
                vote_sent = send_request(novote, NULL);
                CRM_DEV_ASSERT(vote_sent);
-               crm_free(vote_uuid);
                
        } else {
                if(cur_state == S_PENDING) {




------------------------------

Message: 3
Date: Fri, 20 Jan 2006 06:26:45 -0700 (MST)
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/tengine


Modified Files:
        tengine.c 


Log Message:
UUID Cleanup 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/tengine.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- tengine.c   13 Jan 2006 10:31:14 -0000      1.109
+++ tengine.c   20 Jan 2006 13:26:45 -0000      1.110
@@ -1,4 +1,4 @@
-/* $Id: tengine.c,v 1.109 2006/01/13 10:31:14 andrew Exp $ */
+/* $Id: tengine.c,v 1.110 2006/01/20 13:26:45 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -94,9 +94,11 @@
        
        if(te_uuid == NULL) {
                cl_uuid_t new_uuid;
-               crm_malloc0(te_uuid, sizeof(char)*38);
+               char uuid_str[UU_UNPARSE_SIZEOF];
+               
                cl_uuid_generate(&new_uuid);
-               cl_uuid_unparse(&new_uuid, te_uuid);
+               cl_uuid_unparse(&new_uuid, uuid_str);
+               te_uuid = crm_strdup(uuid_str);
                crm_info("Registering TE UUID: %s", te_uuid);
        }
        




------------------------------

Message: 4
Date: Fri, 20 Jan 2006 07:03:06 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : cts

Dir     : linux-ha/cts


Modified Files:
        CM_LinuxHAv2.py.in 


Log Message:
Fix up the short name stuff

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_LinuxHAv2.py.in,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -3 -r1.129 -r1.130
--- CM_LinuxHAv2.py.in  19 Jan 2006 20:41:53 -0000      1.129
+++ CM_LinuxHAv2.py.in  20 Jan 2006 14:03:06 -0000      1.130
@@ -50,7 +50,7 @@
         HeartbeatCM.__init__(self, Environment, randseed=randseed)
         
         self.cluster_monitor = 0
-       self.use_short_names = 0
+       self.use_short_names = 1
         self.update({
             "Name"           : "linux-ha-v2",
             "DeadTime"       : 300,
@@ -484,7 +484,7 @@
             for rsc in rscs:
                 if rsc in grp.childNodes:
                    if self.use_short_names:
-                       resource = HAResource(self,rsc,None)
+                       resource = HAResource(self,rsc)
                    else:
                        resource = HAResource(self,rsc,grp.getAttribute('id'))
                     ResourceList.append(resource)
@@ -523,7 +523,10 @@
             GroupList.append(group)
             for rsc in rscs:
                 if rsc in grp.childNodes:
-                    resource = HAResource(self,rsc,grp.getAttribute('id'))
+                   if self.use_short_names:
+                       resource = HAResource(self,rsc)
+                   else:
+                       resource = HAResource(self,rsc,grp.getAttribute('id'))
                     group.append(resource)
         return GroupList
         




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 26, Issue 47
********************************************

Reply via email to