Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: include by alan from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: lib by alan from  (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: linux-ha by alan from 
      (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: tools by alan from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Tue, 15 Aug 2006 08:05:58 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: include by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : include

Dir     : linux-ha/include/clplumbing


Modified Files:
        cl_random.h 


Log Message:
Bugzilla 1405: BEAM: /*pointer to local variable exposed*/ in cl_random.c

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/clplumbing/cl_random.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- cl_random.h 6 Feb 2006 04:49:16 -0000       1.1
+++ cl_random.h 15 Aug 2006 14:05:58 -0000      1.2
@@ -19,5 +19,5 @@
  */
 
 
-int    cl_randseed(void);
-int    get_next_random(void);   /* Assumes mainloop setup */
+unsigned int   cl_randseed(void);
+int            get_next_random(void);   /* Assumes mainloop setup */




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

Message: 2
Date: Tue, 15 Aug 2006 08:05:59 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/clplumbing


Modified Files:
        cl_random.c 


Log Message:
Bugzilla 1405: BEAM: /*pointer to local variable exposed*/ in cl_random.c

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/cl_random.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- cl_random.c 1 Mar 2006 15:18:42 -0000       1.2
+++ cl_random.c 15 Aug 2006 14:05:58 -0000      1.3
@@ -129,13 +129,18 @@
 
 
 /* Used to provide seed to the random number generator */
-int
+unsigned int
 cl_randseed(void)
 {
        char buf[16];
        FILE* fs;
        struct timeval tv;
+       static struct tms       dummy_tms_struct;
+       const char * randdevname [] = {"/dev/urandom", "/dev/random"};
+       int                     idev;
+#if 0
        long horrid;
+#endif
 
        /*
         * Notes, based on reading of man pages of Solaris, FreeBSD and Linux,
@@ -180,19 +185,21 @@
         */
 
        /*
-        * Does "/dev/urandom" work?
+        * Does any of the random device names work?
         */
-       fs = fopen("/dev/urandom", "r");
-       if (fs == NULL) {
-               cl_log(LOG_INFO, "%s: Opening file /dev/urandom failed", 
-                      __FUNCTION__);
-       }else{
-               if (fread(buf, 1, sizeof(buf), fs)!= sizeof(buf)){
-                       cl_log(LOG_INFO, "%s: reading file /dev/urandom failed",
-                              __FUNCTION__);
+       for (idev=0; idev < DIMOF(randdevname); ++idev) {
+               fs = fopen(randdevname[idev], "r");
+               if (fs == NULL) {
+                       cl_log(LOG_INFO, "%s: Opening file %s failed"
+                       ,       __FUNCTION__, randdevname[idev]);
                }else{
-                       return cl_binary_to_int(buf, sizeof(buf));
-               }       
+                       if (fread(buf, 1, sizeof(buf), fs)!= sizeof(buf)){
+                               cl_log(LOG_INFO, "%s: reading file %s failed"
+                       ,       __FUNCTION__, randdevname[idev]);
+                       }else{
+                               return (unsigned int)cl_binary_to_int(buf, 
sizeof(buf));
+                       }       
+               }
        }
 
        /*
@@ -204,14 +211,28 @@
                cl_log(LOG_INFO, "%s: gettimeofday failed", 
                       __FUNCTION__);
        }else{
-               return tv.tv_usec;
+               return (unsigned int) tv.tv_usec;
        }
+       /*
+        * times(2) returns the number of clock ticks since
+        * boot.  Fairly predictable, but not completely so...
+        *
+        * The man page claims times(2) can fail, but the
+        * correct return result also might include -1 so
+        * in practice it's impossible to tell, and since
+        * dummy_tms_struct can't be invalid there is no
+        * known reason why it should fail.
+        */
+       return (unsigned int) times(&dummy_tms_struct);
+
 
+#if 0
        /*
         * If all else has failed, return (as a number) the address of
         * something on the stack.
         * Poor, but at least it has a chance of some sort of variability.
         */
        horrid = (long) &tv;
-       return (int) horrid;
+       return (unsigned int) horrid; /* pointer to local variable exposed */
+#endif
 }




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

Message: 3
Date: Tue, 15 Aug 2006 08:18:36 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        beam.tcl 


Log Message:
pymgmt_wrap.c contains various pieces of generated BEAM-unfriendly code

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/beam.tcl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- beam.tcl    18 Nov 2005 22:57:33 -0000      1.22
+++ beam.tcl    15 Aug 2006 14:18:35 -0000      1.23
@@ -116,6 +116,9 @@
 set  beam::ERROR33::disabled_functions  "g_bit_nth_msf"
 lappend beam::WARNING15::disabled_files "conf_yacc.c"
 lappend beam::WARNING15::disabled_files "conf_lex.c"
+lappend beam::WARNING15::disabled_files "pymgmt_wrap.c"
+lappend beam::ERROR2::disabled_files "pymgmt_wrap.c"
+lappend beam::ERROR9::disabled_files "pymgmt_wrap.c"
 
 
 




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

Message: 4
Date: Tue, 15 Aug 2006 09:29:17 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : tools

Dir     : linux-ha/tools


Modified Files:
        cl_status.c 


Log Message:
Removed some debugging code from cl_status.c

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/cl_status.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- cl_status.c 29 May 2006 14:21:36 -0000      1.23
+++ cl_status.c 15 Aug 2006 15:29:16 -0000      1.24
@@ -290,7 +290,6 @@
                                return UNKNOWN_ERROR;
                        }
 
-                       /* cl_log(LOG_DEBUG, "Signing in with heartbeat.");*/
                        if (hb->llc_ops->signon(hb, NULL)!= HA_OK) {
                                ret_value = 1;
                                HB_SIGNON = FALSE;
@@ -442,8 +441,6 @@
                return PARAMETER_ERROR;
        }
 
-       cl_log(LOG_DEBUG, "optind: %d   argv[optindex+1]: %s", optind, 
-               argv[optind+1]);
        status = hb->llc_ops->node_status(hb, argv[optind+1]);
        if ( status == NULL ) {
                fprintf(stderr, "Error. May be due to incorrect node name\n");
@@ -483,8 +480,6 @@
                return PARAMETER_ERROR;
        }
 
-       cl_log(LOG_DEBUG, "optind: %d   argv[optindex+1]: %s", optind, 
-               argv[optind+1]);
        weight = hb->llc_ops->node_weight(hb, argv[optind+1]);
        if ( weight == -1 ) {
                fprintf(stderr, "Error. Maybe due to incorrect node name.\n");
@@ -516,8 +511,6 @@
                return PARAMETER_ERROR;
        }
 
-       cl_log(LOG_DEBUG, "optind: %d   argv[optindex+1]: %s", optind, 
-               argv[optind+1]);
        site = hb->llc_ops->node_site(hb, argv[optind+1]);
        if ( site == NULL ) {
                fprintf(stderr, "Error. May be due to incorrect node name\n");
@@ -549,8 +542,6 @@
                return PARAMETER_ERROR;
        }
 
-       cl_log(LOG_DEBUG, "optind: %d   argv[optindex+1]: %s", optind, 
-               argv[optind+1]);
        type = hb->llc_ops->node_type(hb, argv[optind+1]);
        if ( type == NULL ) {
                fprintf(stderr, "Error. May be due to incorrect node name\n");
@@ -580,8 +571,6 @@
                return PARAMETER_ERROR;
        }
 
-       cl_log(LOG_DEBUG, "optind: %d   argv[optindex+1]: %s", optind, 
-               argv[optind+1]);
 
        if (hb->llc_ops->init_ifwalk(hb, argv[optind+1]) != HA_OK) {
                cl_log(LOG_ERR, "Cannot start heartbeat link interface walk.");




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 33, Issue 65
********************************************

Reply via email to