[ PATCH 2.1 1/1 ] mamac: add middleware enumerator for Rai Technology


David @ Rai Technology
 

This patch adds a new middleware type MAMA_MIDDLEWARE_RAI to the current set of middleware types enumerated in middleware.h
This has no impact other than to allow the Rai Technology middleware and payload bridges to load and run.

Signed-off-by: David Ashburner <dna@...>

---
diff --git a/mama/c_cpp/src/c/mama/middleware.h b/mama/c_cpp/src/c/mama/middleware.h
index 1ae80b7..b48b02e 100644
--- a/mama/c_cpp/src/c/mama/middleware.h
+++ b/mama/c_cpp/src/c/mama/middleware.h
@@ -37,7 +37,8 @@ typedef enum mamaMiddleware_
     MAMA_MIDDLEWARE_LBM     = 1,
     MAMA_MIDDLEWARE_TIBRV   = 2,
     MAMA_MIDDLEWARE_AVIS    = 3,
-    MAMA_MIDDLEWARE_MAX     = 4,
+    MAMA_MIDDLEWARE_RAI     = 6,
+    MAMA_MIDDLEWARE_MAX     = 7,
     MAMA_MIDDLEWARE_UNKNOWN = 99
 } mamaMiddleware;


diff --git a/mama/c_cpp/src/c/middleware.c b/mama/c_cpp/src/c/middleware.c
index 2353309..0909eb6 100644
--- a/mama/c_cpp/src/c/middleware.c
+++ b/mama/c_cpp/src/c/middleware.c
@@ -41,6 +41,9 @@ mamaMiddleware_convertFromString (const char*  str)
     if (strcasecmp (str, "avis") == 0)
         return MAMA_MIDDLEWARE_AVIS;

+    if (strcasecmp (str, "rai") == 0)
+        return MAMA_MIDDLEWARE_RAI;
+

     return MAMA_MIDDLEWARE_UNKNOWN;
 }
@@ -59,6 +62,8 @@ mamaMiddleware_convertToString (mamaMiddleware  middleware)
             return "tibrv";
         case MAMA_MIDDLEWARE_AVIS:
             return "AVIS";
+        case MAMA_MIDDLEWARE_RAI:
+            return "rai";
         default:
             return "unknown";
     }