issue id
CCM-01

Summary: CCM code cleanups which need doing

Created by: -- Lars Marowsky-Brée 2004-02-18 09:41:52

  • g_malloc() cannot return NULL; it will abort and dump core instead. So the checks for g_malloc() returning NULL are confusing and redundant; if error handling is desired, maybe CCM should use ha_malloc et al?

  • ccmbitmap.[ch] define functions working on bitmaps. These should however take void ** instead of char ** to avoid type casting problems.

  • ccm.c uses these bitmaps to encode and pass over the network a binary integer array. This is bound to break across systems with different endianess or different integer sizes.

  • Extra points added by AndrewBeekhof:

    typedef struct ccm_llm_s { /* information about low level membership info */
            uint       n;           //number of nodes in the cluster 
            int        mynode;       //index of mynode
            struct  node_s {
                    uint  Uuid;  /* a cluster unique id for the node */
                    char Id[NODEIDSIZE];
            } node[0];
    } ccm_llm_t;
    

    Should be

    typedef struct ccm_llm_s { /* information about low level membership info */
            uint       n;           //number of nodes in the cluster 
            int        mynode;       //index of mynode
            struct  node_s {
                    uint  Uuid;  /* a cluster unique id for the node */
                    char Id[NODEIDSIZE];
            } *node;
    } ccm_llm_t;
    


    CategoryIssue, CategoryOpenIssue

    CCMOpenIssues (last edited 2004-02-18 15:12:22 by )