{Patch 1.1 1/1] mamac: add new middleware enumerator


Tom Doust
 

This patch adds a new middleware type "tick42blp" to the current set of middleware names enumerated in middleware.c

This has no impact other than to allow the tick42 blp middleware bridge to load and run.

Signed-off-by: Tom Doust <tom.doust@...>

---

diff --git a/mama/c_cpp/src/c/mama/middleware.h b/mama/c_cpp/src/c/mama/middleware.h
index 1ae80b7..acf5f9e 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_TICK42BLP = 4,
+ MAMA_MIDDLEWARE_MAX = 5,
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..c2b5db0 100644
--- a/mama/c_cpp/src/c/middleware.c
+++ b/mama/c_cpp/src/c/middleware.c
@@ -38,8 +38,12 @@ mamaMiddleware_convertFromString (const char* str)
if (strcasecmp (str, "tibrv") == 0)
return MAMA_MIDDLEWARE_TIBRV;

- if (strcasecmp (str, "avis") == 0)
- return MAMA_MIDDLEWARE_AVIS;
+ if (strcasecmp (str, "avis") == 0)
+ return MAMA_MIDDLEWARE_AVIS;
+
+ if (strcasecmp (str, "tick42blp") == 0)
+ return MAMA_MIDDLEWARE_TICK42BLP;
+


return MAMA_MIDDLEWARE_UNKNOWN;
@@ -57,8 +61,11 @@ mamaMiddleware_convertToString (mamaMiddleware middleware)
return "lbm";
case MAMA_MIDDLEWARE_TIBRV:
return "tibrv";
- case MAMA_MIDDLEWARE_AVIS:
- return "AVIS";
+ case MAMA_MIDDLEWARE_AVIS:
+ return "AVIS";
+ case MAMA_MIDDLEWARE_TICK42BLP:
+ return "tick42blp";
+
default:
return "unknown";
}

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.