[PATCH] [mama] Use "ft" as default FT transport name


Michael Schonberg <mschonberg@...>
 

From: Mike Schonberg <mschonberg@nyx.com>

When setting up fault tolerance use "ft" as the transport name for reading
properties if the call does not provide a transport.

Signed-off-by: Michael Schonberg <mschonberg@nyx.com>
---
mama/c_cpp/src/c/ft.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/mama/c_cpp/src/c/ft.c b/mama/c_cpp/src/c/ft.c
index efbc16d..0a7931c 100644
--- a/mama/c_cpp/src/c/ft.c
+++ b/mama/c_cpp/src/c/ft.c
@@ -946,18 +946,23 @@ multicastFt_setup (

mamaFtMemberImpl* impl = (mamaFtMemberImpl*) member;

- if (!impl || !groupName || !transport)
+ if (!impl || !groupName)
return MAMA_STATUS_INVALID_ARG;

/* Get the transport name. */
- status = mamaTransport_getName(transport, &transportName);
- if((MAMA_STATUS_OK != status) || (NULL == transportName) || ('\0' ==
- transportName[0]))
+ if(transport)
{
- mama_log (MAMA_LOG_LEVEL_ERROR, "MAMA multicast FT: the transport name "
- "is invalid");
- return MAMA_STATUS_INVALID_ARG;
+ status = mamaTransport_getName(transport, &transportName);
+ if((MAMA_STATUS_OK != status) || (NULL == transportName) || ('\0' ==
+ transportName[0]))
+ {
+ mama_log (MAMA_LOG_LEVEL_ERROR, "MAMA multicast FT: the transport name "
+ "is invalid");
+ return MAMA_STATUS_INVALID_ARG;
+ }
}
+ else
+ transportName = "ft";

ftInterface = multicastFt_getProperty(propertyName,
"mama.multicast.transport.%s.interface", transportName);
--
1.7.7.6