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: include by alan from 
      ([email protected])
   2. Linux-HA CVS: lib by alan from  ([email protected])
   3. Linux-HA CVS: linux-ha by alan from 
      ([email protected])
   4. Linux-HA CVS: heartbeat by alan from 
      ([email protected])


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

Message: 1
Date: Sun, 23 Apr 2006 16:06:11 -0600 (MDT)
From: [email protected]
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


Modified Files:
        hb_api.h 


Log Message:
Added new Gsource for hb channels to header file.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/hb_api.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- hb_api.h    1 Feb 2006 14:59:09 -0000       1.44
+++ hb_api.h    23 Apr 2006 22:06:10 -0000      1.45
@@ -1,4 +1,4 @@
-/* $Id: hb_api.h,v 1.44 2006/02/01 14:59:09 alan Exp $ */
+/* $Id: hb_api.h,v 1.45 2006/04/23 22:06:10 alan Exp $ */
 /*
  * Client-side Low-level clustering API for heartbeat.
  *
@@ -436,4 +436,11 @@
 #define KEY_CONFIG_WRITES_ENABLED "enable_config_writes"
 
 ll_cluster_t*  ll_cluster_new(const char * llctype);
+
+typedef struct GLLclusterSource_s      GLLclusterSource;
+GLLclusterSource* G_main_add_ll_cluster(int priority, ll_cluster_t* api
+,      gboolean can_recurse
+,      gboolean (*dispatch)(ll_cluster_t* source_data,gpointer user_data)
+,      gpointer userdata, GDestroyNotify notify);
+
 #endif /* __HB_API_H */




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

Message: 2
Date: Sun, 23 Apr 2006 16:07:06 -0600 (MDT)
From: [email protected]
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/hbclient


Modified Files:
        client_lib.c 


Log Message:
Added new GSource for heartbeat API.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/hbclient/client_lib.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- client_lib.c        7 Apr 2006 13:36:57 -0000       1.37
+++ client_lib.c        23 Apr 2006 22:07:06 -0000      1.38
@@ -1,4 +1,4 @@
-/* $Id: client_lib.c,v 1.37 2006/04/07 13:36:57 lars Exp $ */
+/* $Id: client_lib.c,v 1.38 2006/04/23 22:07:06 alan Exp $ */
 /* 
  * client_lib: heartbeat API client side code
  *
@@ -3157,3 +3157,128 @@
        }
        return NULL;
 }
+
+#include <clplumbing/GSource_internal.h>
+
+#define        OURMAGIC        0xbeef1234
+
+struct GLLclusterSource_s {
+       GCHSource       chsrc;
+       unsigned long   magic2;
+       ll_cluster_t*   hbchan;
+       gboolean(*dispatch)(ll_cluster_t* llc, gpointer udata);
+};
+
+
+
+static gboolean G_llc_prepare_int(GSource* source, gint* timeout);
+static gboolean G_llc_check_int(GSource* source);
+static gboolean G_llc_dispatch_int(GSource* source, GSourceFunc callback
+,      gpointer user_data);
+static void G_llc_destroy_int(GSource* source);
+
+static GSourceFuncs G_llc_SourceFuncs = {
+       G_llc_prepare_int,
+       G_llc_check_int,
+       G_llc_dispatch_int,
+       G_llc_destroy_int,
+};
+
+#define        CHECKMAGIC(s,value)     {if ((s)->magic2 != OURMAGIC) {         
\
+                                       cl_log(LOG_ERR                  \
+                                       ,       "%s: invalid magic number"\
+                                       ,       __FUNCTION__);          \
+                                       return value;                   \
+                               }}
+
+static gboolean
+G_llc_prepare_int(GSource* source, gint* timeout)
+{
+       GLLclusterSource*       s = (GLLclusterSource*)source;
+
+       CHECKMAGIC(s, FALSE);
+       (void)G_CH_prepare_int(source, timeout);
+       
+       return s->hbchan->llc_ops->msgready(s->hbchan);
+}
+
+static gboolean
+G_llc_check_int(GSource* source)
+{
+       GLLclusterSource*       s = (GLLclusterSource*)source;
+
+       CHECKMAGIC(s, FALSE);
+       (void)G_CH_check_int(source);
+       
+       return s->hbchan->llc_ops->msgready(s->hbchan);
+}
+
+static gboolean
+G_llc_dispatch_int(GSource* source, GSourceFunc callback
+,      gpointer user_data)
+{
+       gboolean        ret1 = TRUE;
+       gboolean        ret2 = TRUE;
+       GLLclusterSource*       s = (GLLclusterSource*)source;
+
+       CHECKMAGIC(s, FALSE);
+       ret1 = G_CH_dispatch_int(source, callback, user_data);
+       
+       if (s->hbchan->llc_ops->msgready(s->hbchan) && s->dispatch) {
+               ret2 = s->dispatch(s->hbchan, s->chsrc.udata);
+       }
+       return ret1 && ret2;
+}
+
+static
+void G_llc_destroy_int(GSource* source)
+{
+       GLLclusterSource*       s = (GLLclusterSource*)source;
+       llc_private_t*          pi;
+       pi = (llc_private_t*)s->hbchan->ll_cluster_private;
+
+       CHECKMAGIC(s, );
+       s->magic2 = 0;
+       G_CH_destroy_int(source);
+       pi->chan = NULL;
+       s->hbchan->llc_ops->delete(s->hbchan);
+}
+
+
+GLLclusterSource*
+G_main_add_ll_cluster(int priority, ll_cluster_t* api
+,      gboolean can_recurse
+,      gboolean (*dispatch)(ll_cluster_t* source_data,gpointer user_data)
+,      gpointer userdata, GDestroyNotify notify)
+{
+       GSource * source =      g_source_new(&G_llc_SourceFuncs
+       ,                       sizeof(GLLclusterSource));
+       GLLclusterSource*       s = (GLLclusterSource*)source;
+       IPC_Channel*            ch;
+
+       if (source == NULL || api == NULL || api->llc_ops == NULL
+       ||      (ch = api->llc_ops->ipcchan(api)) == NULL) {
+               return NULL;
+       }
+       s->magic2 = OURMAGIC;
+       (void)G_main_IPC_Channel_constructor(source, ch, userdata, notify);
+
+       s->dispatch = dispatch;
+       
+       g_source_set_priority(source, priority);
+       g_source_set_can_recurse(source, can_recurse);
+       
+       s->chsrc.description = "Heartbeat API channel";
+       s->chsrc.gsourceid = g_source_attach(source, NULL);
+
+       if (s->chsrc.gsourceid == 0) {
+               g_source_remove_poll(source, &s->chsrc.infd);
+               if (!s->chsrc.fd_fdx) {
+                       g_source_remove_poll(source, &s->chsrc.outfd);
+               }
+               g_source_unref(source);
+               source = NULL;
+               s = NULL;
+       }
+       return s;
+}




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

Message: 3
Date: Sun, 23 Apr 2006 17:59:17 -0600 (MDT)
From: [email protected]
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:
        configure.in 


Log Message:
Updated version number...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.506
retrieving revision 1.507
diff -u -3 -r1.506 -r1.507
--- configure.in        19 Apr 2006 15:49:19 -0000      1.506
+++ configure.in        23 Apr 2006 23:59:17 -0000      1.507
@@ -10,14 +10,14 @@
 AC_INIT(heartbeat.spec.in)
 
 AC_CONFIG_AUX_DIR(.)
-AC_REVISION($Revision: 1.506 $) dnl cvs revision
+AC_REVISION($Revision: 1.507 $) dnl cvs revision
 AC_CANONICAL_HOST
 
 
 dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
 AM_CONFIG_HEADER(linux-ha/config.h include/ha_config.h)
 ALL_LINGUAS="en fr"
-AM_INIT_AUTOMAKE(heartbeat, 2.0.4)
+AM_INIT_AUTOMAKE(heartbeat, 2.0.5)
 RPMREL=1
 AC_SUBST(RPMREL)
 HB_PKG=heartbeat




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

Message: 4
Date: Sun, 23 Apr 2006 18:00:05 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/heartbeat


Modified Files:
        hb_uuid.c 


Log Message:
Removed 3 blank lines at the end of the file.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/hb_uuid.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- hb_uuid.c   23 Feb 2006 20:47:21 -0000      1.22
+++ hb_uuid.c   24 Apr 2006 00:00:05 -0000      1.23
@@ -750,6 +750,3 @@
        return read_delnode_file(cfg);  
        
 }
-
-
-




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

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


End of Linux-ha-cvs Digest, Vol 29, Issue 123
*********************************************

Reply via email to