rpms/qpidc/devel corosync.patch,1.3,1.4

Nuno Santos nsantos at fedoraproject.org
Thu Jan 8 22:44:13 UTC 2009


Author: nsantos

Update of /cvs/extras/rpms/qpidc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9130

Modified Files:
	corosync.patch 
Log Message:
revised corosync patch, from svn rev 732854

corosync.patch:

Index: corosync.patch
===================================================================
RCS file: /cvs/extras/rpms/qpidc/devel/corosync.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- corosync.patch	8 Jan 2009 22:00:22 -0000	1.3
+++ corosync.patch	8 Jan 2009 22:43:43 -0000	1.4
@@ -1,26 +1,9 @@
---- src/qpid/cluster/types.h (original)
-+++ src/qpid/cluster/types.h Wed Jan  7 07:00:55 2009
-@@ -34,9 +34,9 @@
- #include <stdint.h>
- 
- extern "C" {
--#ifdef HAVE_OPENAIS_CPG_H    
--#include <openais/cpg.h>
--#elif HAVE_COROSYNC_CPG_H    
-+#if defined (HAVE_OPENAIS_CPG_H)
-+#  include <openais/cpg.h>
-+#elif defined (HAVE_COROSYNC_CPG_H)
- #  include <corosync/cpg.h>
- #else
- #  error "No cpg.h header file available"
---- src/qpid/cluster/Cpg.cpp (original)
-+++ src/qpid/cluster/Cpg.cpp Thu Jan  8 13:56:21 2009
-@@ -126,8 +126,16 @@
+--- src/qpid/cluster/Cpg.cpp	2009-01-08 17:34:25.000000000 -0500
++++ src/qpid/cluster/Cpg.cpp	2008-12-17 18:44:04.000000000 -0500
+@@ -126,27 +126,36 @@
      }
  }
  
--void Cpg::dispatch(cpg_dispatch_t type) {
--    check(cpg_dispatch(handle,type), "Error in CPG dispatch");
 +void Cpg::dispatchOne() {
 +    check(cpg_dispatch(handle,CPG_DISPATCH_ONE), "Error in CPG dispatch");
 +}
@@ -31,24 +14,46 @@
 +
 +void Cpg::dispatchBlocking() {
 +    check(cpg_dispatch(handle,CPG_DISPATCH_BLOCKING), "Error in CPG dispatch");
+-void Cpg::dispatch(cpg_dispatch_t type) {
+-    check(cpg_dispatch(handle,type), "Error in CPG dispatch");
  }
  
  string Cpg::errorStr(cpg_error_t err, const std::string& msg) {
-@@ -135,7 +143,7 @@
+     switch (err) {
        case CPG_OK: return msg+": ok";
-       case CPG_ERR_LIBRARY: return msg+": library error";
+-      case CPG_ERR_LIBRARY: return msg+": library error";
        case CPG_ERR_TIMEOUT: return msg+": timeout";
--      case CPG_ERR_TRY_AGAIN: return msg+": timeout. The aisexec daemon may not be running";
-+      case CPG_ERR_TRY_AGAIN: return msg+": timeout.";
+       case CPG_ERR_TRY_AGAIN: return msg+": timeout. The aisexec daemon may not be running";
        case CPG_ERR_INVALID_PARAM: return msg+": invalid param";
        case CPG_ERR_NO_MEMORY: return msg+": no memory";
        case CPG_ERR_BAD_HANDLE: return msg+": bad handle";
---- src/qpid/cluster/Cpg.h (original)
-+++ src/qpid/cluster/Cpg.h Thu Jan  8 13:56:21 2009
++      case CPG_ERR_ACCESS: return msg+": access denied. You may need to set your group ID to 'ais'";
+-      case CPG_ERR_ACCESS: return msg+": access denied.";
+       case CPG_ERR_NOT_EXIST: return msg+": not exist";
+       case CPG_ERR_EXIST: return msg+": exist";
+       case CPG_ERR_NOT_SUPPORTED: return msg+": not supported";
++        // The following are not mapped, or are incorrectly mapped in corosync 0-92-5
++        // case CPG_ERR_LIBRARY: return msg+": library";
++        // case CPG_ERR_SECURITY: return msg+": security";
++        // case CPG_ERR_TOO_MANY_GROUPS: return msg+": too many groups";
++
+-      case CPG_ERR_SECURITY: return msg+": security";
+-      case CPG_ERR_TOO_MANY_GROUPS: return msg+": too many groups";
+       default:
++        return ": cpg error";
+-        assert(0);
+-        return ": unknown";
+     };
+ }
+--- src/qpid/cluster/Cpg.h	2009-01-08 17:25:30.000000000 -0500
++++ src/qpid/cluster/Cpg.h	2008-12-17 18:44:04.000000000 -0500
 @@ -94,17 +94,9 @@
      /** Disconnect from CPG */
      void shutdown();
      
++    void dispatchOne();
++    void dispatchAll();
++    void dispatchBlocking();
 -    /** Dispatch CPG events.
 -     *@param type one of
 -     * - CPG_DISPATCH_ONE - dispatch exactly one event.
@@ -60,9 +65,21 @@
 -    void dispatchOne() { dispatch(CPG_DISPATCH_ONE); }
 -    void dispatchAll() { dispatch(CPG_DISPATCH_ALL); }
 -    void dispatchBlocking() { dispatch(CPG_DISPATCH_BLOCKING); }
-+    void dispatchOne();
-+    void dispatchAll();
-+    void dispatchBlocking();
  
      void join(const std::string& group);    
      void leave();
+--- src/qpid/cluster/types.h	2009-01-08 17:25:30.000000000 -0500
++++ src/qpid/cluster/types.h	2008-12-17 18:44:04.000000000 -0500
+@@ -34,9 +34,9 @@
+ #include <stdint.h>
+ 
+ extern "C" {
++#if defined (HAVE_OPENAIS_CPG_H)
++#  include <openais/cpg.h>
++#elif defined (HAVE_COROSYNC_CPG_H)
+-#ifdef HAVE_OPENAIS_CPG_H    
+-#include <openais/cpg.h>
+-#elif HAVE_COROSYNC_CPG_H    
+ #  include <corosync/cpg.h>
+ #else
+ #  error "No cpg.h header file available"




More information about the fedora-extras-commits mailing list