Date   

[PATCH 2.3.1 1/1] Common: variable expansion in property value on the last line of properties file fails

Guy <guy.tal@...>
 

Hi,

The properties file parser fails to expand variable if such exists in a value that is also at the last line in the properties file.
For example, Consider <EOF> as the last character in file, if the last property in the file is as follows:
my.property=$(SOME_VALUE)<EOF>
and $(SOME_VALUE)=Hello World, we would expect my.property to be "Hello World", but it doesn't, it remains $(SOME_VALUE)

The properties file parser expandss environment variable if such exist inside a property value, but not if the value is the last one before end-of-file.

The solution is to check if there are key and value already parsed also when reaching end of file.
Plese look at common/c_cpp/src/c/properties.l from line 159:
<<EOF>> { /* Handle EOF right at the end of a */
/* value string */
if ( curKey && curValue )
{
replaceValue = propertiesImpl_ReplaceEnvironmentVariable(curValue); //<- beginning of the missing part
if(replaceValue != NULL)
{
/* Delete the original value */
free(curValue);

/* Copy the replaced value into the
* current value pointer. */
curValue = replaceValue;
} //<- that is all

I opened a bug at:
http://bugs.openmama.org/show_bug.cgi?id=156

I provide here a patch of the lex file for review.

Regards,
Guy Tal
Tick42


Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Glenn McClements <gmcclements@...>
 

It would generally be used in publishing applications, but as it's public I've no visibility how much it's used in the wild in other places.

We're also looking at some cross platform macros for deprecating functions, so we can consider mamaDictionary_getDictionaryMessage() to be officially marked as deprecated when _populate is put in. 

Glenn 

From: Tom Doust [tom.doust@...]
Sent: 03 September 2014 11:37
To: Glenn McClements; Openmama-dev@...
Subject: RE: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Hi Glenn

 

Both of those of those points are accepted and I’ll re-submit a patch in a couple of days when I can get this back to the top of my todo list J

 

Is this function ever used anywhere other than in a bridge? We only use it in the context of a bridge building a message from the dictionary in order to publish it

 

Tom

 

From: Glenn McClements [mailto:gmcclements@...]
Sent: 03 September 2014 4:29 PM
To: Tom Doust; Openmama-dev@...
Subject: RE: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Cheers Tom. 

 

I think this way is cleaner than passing in a payload ID or bridge to the dictionary functions, as it keeps all the payload specific stuff in the mamaMsg calls where it belongs.

 

Two minor points about the signature: 

 

- I'd prefer 'populate' rather than 'fill', as populate is used elsewhere in the API

- There's no need for it to be pointer to a mamaMsg

 

As always, C++, .Net and Java/JNI will need this to be updated as well. 

 

Also to note that we'll be deprecating the use of the payload enum identifier in favour of a bridge handle. This won't make a difference to this way of doing it though.

 

Glenn 

 


From: openmama-dev-bounces@... [openmama-dev-bounces@...] on behalf of Tom Doust [tom.doust@...]
Sent: 03 September 2014 09:56
To: Openmama-dev@...
Subject: Re: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Hi

 

Attached is a patch for OpenMAMA that provides an alternative function to populate a mamaMsg with the dictionary. This differs from the existining function by allowing the caller to pass a mamaMsg that has been pre-created on whatever payload is desired.

 

We are currently building and running the Tick42 RMDS bridge against OpenMAMA libraries with the patch applied. The new function is used something like this (with conditional compilation to show the ‘old’ version)

 

              // Prepare the OpenMAMA dictionary part of the message

#if defined(MAMA_DICTIONARY_PATCH)

              // provided mama has been patched for the new dictionary function we can create our own message on our own payload

              mamaMsg dictMsg=NULL;

              mamaMsg_createForPayload(&dictMsg, 'P');

              mama_status res = mamaDictionary_fillDictionaryMessage(dictionary, &dictMsg);

#else

              mamaMsg dictMsg=NULL;

              mama_status res = mamaDictionary_getDictionaryMessage (dictionary, &dictMsg);

#endif

 

 

As I said before, in theory, it shouldn’t matter which payload a dictionary message uses, but in a context when multiple bridges are loaded it’s desirable to know which code is being executed.

 

I’m interested to hear from other bridge developers any thoughts, opiniions or questions on this subject

 

Best regards

 

Tom

 

The patch is also shown below

 

 

 

diff --git a/README b/README

index be1ad38..f278d0d 100644

--- a/README

+++ b/README

@@ -2,7 +2,7 @@ OpenMAMA Client Library

============================

 Release: 2.3.1

-Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/heads/OpenMAMA-2.3.1

+Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/tags/OpenMAMA-2.3.1-release

 Project Page

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

diff --git a/mama/c_cpp/src/c/dictionary.c b/mama/c_cpp/src/c/dictionary.c

index 7f7d605..8a6d275 100644

--- a/mama/c_cpp/src/c/dictionary.c

+++ b/mama/c_cpp/src/c/dictionary.c

@@ -496,6 +496,21 @@ mamaDictionary_getDictionaryMessage (

}

 mama_status

+             mamaDictionary_fillDictionaryMessage (

+             mamaDictionary dictionary,

+             mamaMsg* msg)

+{

+             mamaDictionaryImpl* impl = (mamaDictionaryImpl*)dictionary;

+

+             if (!impl) return MAMA_STATUS_NULL_ARG;

+             if (!msg) return MAMA_STATUS_INVALID_ARG;

+

+             populateMessageFromDictionary (impl, *msg);

+

+             return MAMA_STATUS_OK;

+}

+

+mama_status

mamaDictionary_createFieldDescriptor (

                 mamaDictionary       dictionary,

                 mama_fid_t           fid,

diff --git a/mama/c_cpp/src/c/mama/dictionary.h b/mama/c_cpp/src/c/mama/dictionary.h

index 0eda958..40f7885 100644

--- a/mama/c_cpp/src/c/mama/dictionary.h

+++ b/mama/c_cpp/src/c/mama/dictionary.h

@@ -268,6 +268,22 @@ mamaDictionary_getDictionaryMessage (

     mamaMsg* msg);

 /**

+ * Fill a message with the data dictionary.

+ *

+ * An existing mama message is populated fromt he data dictionary

+ * This allows the caller to create the message on a specifc payload

+ *

+ * @param dictionary The Dictionary

+ * @param msg The address of the mamaMsg where the result is to be written

+ */

+MAMAExpDLL

+extern mama_status

+mamaDictionary_fillDictionaryMessage (

+    mamaDictionary dictionary,

+    mamaMsg* msg);

+

+

+/**

  * Create a new field descriptor and add it to the dictionary.

  * New fields can be added to an existing dictionary obtained

  * from the MAMA infrastructure. This function can also be used

 

 

 

 

 

 

From: Tom Doust
Sent: 29 August 2014 10:12 AM
To: Openmama-dev@...
Subject: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com


 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Tom Doust
 

Hi Glenn

 

Both of those of those points are accepted and I’ll re-submit a patch in a couple of days when I can get this back to the top of my todo list J

 

Is this function ever used anywhere other than in a bridge? We only use it in the context of a bridge building a message from the dictionary in order to publish it

 

Tom

 

From: Glenn McClements [mailto:gmcclements@...]
Sent: 03 September 2014 4:29 PM
To: Tom Doust; Openmama-dev@...
Subject: RE: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Cheers Tom. 

 

I think this way is cleaner than passing in a payload ID or bridge to the dictionary functions, as it keeps all the payload specific stuff in the mamaMsg calls where it belongs.

 

Two minor points about the signature: 

 

- I'd prefer 'populate' rather than 'fill', as populate is used elsewhere in the API

- There's no need for it to be pointer to a mamaMsg

 

As always, C++, .Net and Java/JNI will need this to be updated as well. 

 

Also to note that we'll be deprecating the use of the payload enum identifier in favour of a bridge handle. This won't make a difference to this way of doing it though.

 

Glenn 

 


From: openmama-dev-bounces@... [openmama-dev-bounces@...] on behalf of Tom Doust [tom.doust@...]
Sent: 03 September 2014 09:56
To: Openmama-dev@...
Subject: Re: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Hi

 

Attached is a patch for OpenMAMA that provides an alternative function to populate a mamaMsg with the dictionary. This differs from the existining function by allowing the caller to pass a mamaMsg that has been pre-created on whatever payload is desired.

 

We are currently building and running the Tick42 RMDS bridge against OpenMAMA libraries with the patch applied. The new function is used something like this (with conditional compilation to show the ‘old’ version)

 

              // Prepare the OpenMAMA dictionary part of the message

#if defined(MAMA_DICTIONARY_PATCH)

              // provided mama has been patched for the new dictionary function we can create our own message on our own payload

              mamaMsg dictMsg=NULL;

              mamaMsg_createForPayload(&dictMsg, 'P');

              mama_status res = mamaDictionary_fillDictionaryMessage(dictionary, &dictMsg);

#else

              mamaMsg dictMsg=NULL;

              mama_status res = mamaDictionary_getDictionaryMessage (dictionary, &dictMsg);

#endif

 

 

As I said before, in theory, it shouldn’t matter which payload a dictionary message uses, but in a context when multiple bridges are loaded it’s desirable to know which code is being executed.

 

I’m interested to hear from other bridge developers any thoughts, opiniions or questions on this subject

 

Best regards

 

Tom

 

The patch is also shown below

 

 

 

diff --git a/README b/README

index be1ad38..f278d0d 100644

--- a/README

+++ b/README

@@ -2,7 +2,7 @@ OpenMAMA Client Library

============================

 Release: 2.3.1

-Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/heads/OpenMAMA-2.3.1

+Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/tags/OpenMAMA-2.3.1-release

 Project Page

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

diff --git a/mama/c_cpp/src/c/dictionary.c b/mama/c_cpp/src/c/dictionary.c

index 7f7d605..8a6d275 100644

--- a/mama/c_cpp/src/c/dictionary.c

+++ b/mama/c_cpp/src/c/dictionary.c

@@ -496,6 +496,21 @@ mamaDictionary_getDictionaryMessage (

}

 mama_status

+             mamaDictionary_fillDictionaryMessage (

+             mamaDictionary dictionary,

+             mamaMsg* msg)

+{

+             mamaDictionaryImpl* impl = (mamaDictionaryImpl*)dictionary;

+

+             if (!impl) return MAMA_STATUS_NULL_ARG;

+             if (!msg) return MAMA_STATUS_INVALID_ARG;

+

+             populateMessageFromDictionary (impl, *msg);

+

+             return MAMA_STATUS_OK;

+}

+

+mama_status

mamaDictionary_createFieldDescriptor (

                 mamaDictionary       dictionary,

                 mama_fid_t           fid,

diff --git a/mama/c_cpp/src/c/mama/dictionary.h b/mama/c_cpp/src/c/mama/dictionary.h

index 0eda958..40f7885 100644

--- a/mama/c_cpp/src/c/mama/dictionary.h

+++ b/mama/c_cpp/src/c/mama/dictionary.h

@@ -268,6 +268,22 @@ mamaDictionary_getDictionaryMessage (

     mamaMsg* msg);

 /**

+ * Fill a message with the data dictionary.

+ *

+ * An existing mama message is populated fromt he data dictionary

+ * This allows the caller to create the message on a specifc payload

+ *

+ * @param dictionary The Dictionary

+ * @param msg The address of the mamaMsg where the result is to be written

+ */

+MAMAExpDLL

+extern mama_status

+mamaDictionary_fillDictionaryMessage (

+    mamaDictionary dictionary,

+    mamaMsg* msg);

+

+

+/**

  * Create a new field descriptor and add it to the dictionary.

  * New fields can be added to an existing dictionary obtained

  * from the MAMA infrastructure. This function can also be used

 

 

 

 

 

 

From: Tom Doust
Sent: 29 August 2014 10:12 AM
To: Openmama-dev@...
Subject: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com


 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Glenn McClements <gmcclements@...>
 

Also having the user create the message makes it explicit who owns the memory which I like as well. 

Glenn 

From: openmama-dev-bounces@... [openmama-dev-bounces@...] on behalf of Glenn McClements [gmcclements@...]
Sent: 03 September 2014 11:28
To: Tom Doust; Openmama-dev@...
Subject: Re: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Cheers Tom. 

I think this way is cleaner than passing in a payload ID or bridge to the dictionary functions, as it keeps all the payload specific stuff in the mamaMsg calls where it belongs.

Two minor points about the signature: 

- I'd prefer 'populate' rather than 'fill', as populate is used elsewhere in the API
- There's no need for it to be pointer to a mamaMsg

As always, C++, .Net and Java/JNI will need this to be updated as well. 

Also to note that we'll be deprecating the use of the payload enum identifier in favour of a bridge handle. This won't make a difference to this way of doing it though.

Glenn 


From: openmama-dev-bounces@... [openmama-dev-bounces@...] on behalf of Tom Doust [tom.doust@...]
Sent: 03 September 2014 09:56
To: Openmama-dev@...
Subject: Re: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Hi

 

Attached is a patch for OpenMAMA that provides an alternative function to populate a mamaMsg with the dictionary. This differs from the existining function by allowing the caller to pass a mamaMsg that has been pre-created on whatever payload is desired.

 

We are currently building and running the Tick42 RMDS bridge against OpenMAMA libraries with the patch applied. The new function is used something like this (with conditional compilation to show the ‘old’ version)

 

              // Prepare the OpenMAMA dictionary part of the message

#if defined(MAMA_DICTIONARY_PATCH)

              // provided mama has been patched for the new dictionary function we can create our own message on our own payload

              mamaMsg dictMsg=NULL;

              mamaMsg_createForPayload(&dictMsg, 'P');

              mama_status res = mamaDictionary_fillDictionaryMessage(dictionary, &dictMsg);

#else

              mamaMsg dictMsg=NULL;

              mama_status res = mamaDictionary_getDictionaryMessage (dictionary, &dictMsg);

#endif

 

 

As I said before, in theory, it shouldn’t matter which payload a dictionary message uses, but in a context when multiple bridges are loaded it’s desirable to know which code is being executed.

 

I’m interested to hear from other bridge developers any thoughts, opiniions or questions on this subject

 

Best regards

 

Tom

 

The patch is also shown below

 

 

 

diff --git a/README b/README

index be1ad38..f278d0d 100644

--- a/README

+++ b/README

@@ -2,7 +2,7 @@ OpenMAMA Client Library

============================

 Release: 2.3.1

-Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/heads/OpenMAMA-2.3.1

+Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/tags/OpenMAMA-2.3.1-release

 Project Page

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

diff --git a/mama/c_cpp/src/c/dictionary.c b/mama/c_cpp/src/c/dictionary.c

index 7f7d605..8a6d275 100644

--- a/mama/c_cpp/src/c/dictionary.c

+++ b/mama/c_cpp/src/c/dictionary.c

@@ -496,6 +496,21 @@ mamaDictionary_getDictionaryMessage (

}

 mama_status

+             mamaDictionary_fillDictionaryMessage (

+             mamaDictionary dictionary,

+             mamaMsg* msg)

+{

+             mamaDictionaryImpl* impl = (mamaDictionaryImpl*)dictionary;

+

+             if (!impl) return MAMA_STATUS_NULL_ARG;

+             if (!msg) return MAMA_STATUS_INVALID_ARG;

+

+             populateMessageFromDictionary (impl, *msg);

+

+             return MAMA_STATUS_OK;

+}

+

+mama_status

mamaDictionary_createFieldDescriptor (

                 mamaDictionary       dictionary,

                 mama_fid_t           fid,

diff --git a/mama/c_cpp/src/c/mama/dictionary.h b/mama/c_cpp/src/c/mama/dictionary.h

index 0eda958..40f7885 100644

--- a/mama/c_cpp/src/c/mama/dictionary.h

+++ b/mama/c_cpp/src/c/mama/dictionary.h

@@ -268,6 +268,22 @@ mamaDictionary_getDictionaryMessage (

     mamaMsg* msg);

 /**

+ * Fill a message with the data dictionary.

+ *

+ * An existing mama message is populated fromt he data dictionary

+ * This allows the caller to create the message on a specifc payload

+ *

+ * @param dictionary The Dictionary

+ * @param msg The address of the mamaMsg where the result is to be written

+ */

+MAMAExpDLL

+extern mama_status

+mamaDictionary_fillDictionaryMessage (

+    mamaDictionary dictionary,

+    mamaMsg* msg);

+

+

+/**

  * Create a new field descriptor and add it to the dictionary.

  * New fields can be added to an existing dictionary obtained

  * from the MAMA infrastructure. This function can also be used

 

 

 

 

 

 

From: Tom Doust
Sent: 29 August 2014 10:12 AM
To: Openmama-dev@...
Subject: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com


 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Glenn McClements <gmcclements@...>
 

Cheers Tom. 

I think this way is cleaner than passing in a payload ID or bridge to the dictionary functions, as it keeps all the payload specific stuff in the mamaMsg calls where it belongs.

Two minor points about the signature: 

- I'd prefer 'populate' rather than 'fill', as populate is used elsewhere in the API
- There's no need for it to be pointer to a mamaMsg

As always, C++, .Net and Java/JNI will need this to be updated as well. 

Also to note that we'll be deprecating the use of the payload enum identifier in favour of a bridge handle. This won't make a difference to this way of doing it though.

Glenn 


From: openmama-dev-bounces@... [openmama-dev-bounces@...] on behalf of Tom Doust [tom.doust@...]
Sent: 03 September 2014 09:56
To: Openmama-dev@...
Subject: Re: [Openmama-dev] problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Hi

 

Attached is a patch for OpenMAMA that provides an alternative function to populate a mamaMsg with the dictionary. This differs from the existining function by allowing the caller to pass a mamaMsg that has been pre-created on whatever payload is desired.

 

We are currently building and running the Tick42 RMDS bridge against OpenMAMA libraries with the patch applied. The new function is used something like this (with conditional compilation to show the ‘old’ version)

 

              // Prepare the OpenMAMA dictionary part of the message

#if defined(MAMA_DICTIONARY_PATCH)

              // provided mama has been patched for the new dictionary function we can create our own message on our own payload

              mamaMsg dictMsg=NULL;

              mamaMsg_createForPayload(&dictMsg, 'P');

              mama_status res = mamaDictionary_fillDictionaryMessage(dictionary, &dictMsg);

#else

              mamaMsg dictMsg=NULL;

              mama_status res = mamaDictionary_getDictionaryMessage (dictionary, &dictMsg);

#endif

 

 

As I said before, in theory, it shouldn’t matter which payload a dictionary message uses, but in a context when multiple bridges are loaded it’s desirable to know which code is being executed.

 

I’m interested to hear from other bridge developers any thoughts, opiniions or questions on this subject

 

Best regards

 

Tom

 

The patch is also shown below

 

 

 

diff --git a/README b/README

index be1ad38..f278d0d 100644

--- a/README

+++ b/README

@@ -2,7 +2,7 @@ OpenMAMA Client Library

============================

 Release: 2.3.1

-Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/heads/OpenMAMA-2.3.1

+Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/tags/OpenMAMA-2.3.1-release

 Project Page

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

diff --git a/mama/c_cpp/src/c/dictionary.c b/mama/c_cpp/src/c/dictionary.c

index 7f7d605..8a6d275 100644

--- a/mama/c_cpp/src/c/dictionary.c

+++ b/mama/c_cpp/src/c/dictionary.c

@@ -496,6 +496,21 @@ mamaDictionary_getDictionaryMessage (

}

 mama_status

+             mamaDictionary_fillDictionaryMessage (

+             mamaDictionary dictionary,

+             mamaMsg* msg)

+{

+             mamaDictionaryImpl* impl = (mamaDictionaryImpl*)dictionary;

+

+             if (!impl) return MAMA_STATUS_NULL_ARG;

+             if (!msg) return MAMA_STATUS_INVALID_ARG;

+

+             populateMessageFromDictionary (impl, *msg);

+

+             return MAMA_STATUS_OK;

+}

+

+mama_status

mamaDictionary_createFieldDescriptor (

                 mamaDictionary       dictionary,

                 mama_fid_t           fid,

diff --git a/mama/c_cpp/src/c/mama/dictionary.h b/mama/c_cpp/src/c/mama/dictionary.h

index 0eda958..40f7885 100644

--- a/mama/c_cpp/src/c/mama/dictionary.h

+++ b/mama/c_cpp/src/c/mama/dictionary.h

@@ -268,6 +268,22 @@ mamaDictionary_getDictionaryMessage (

     mamaMsg* msg);

 /**

+ * Fill a message with the data dictionary.

+ *

+ * An existing mama message is populated fromt he data dictionary

+ * This allows the caller to create the message on a specifc payload

+ *

+ * @param dictionary The Dictionary

+ * @param msg The address of the mamaMsg where the result is to be written

+ */

+MAMAExpDLL

+extern mama_status

+mamaDictionary_fillDictionaryMessage (

+    mamaDictionary dictionary,

+    mamaMsg* msg);

+

+

+/**

  * Create a new field descriptor and add it to the dictionary.

  * New fields can be added to an existing dictionary obtained

  * from the MAMA infrastructure. This function can also be used

 

 

 

 

 

 

From: Tom Doust
Sent: 29 August 2014 10:12 AM
To: Openmama-dev@...
Subject: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com


 

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Tom Doust
 

Hi

 

Attached is a patch for OpenMAMA that provides an alternative function to populate a mamaMsg with the dictionary. This differs from the existining function by allowing the caller to pass a mamaMsg that has been pre-created on whatever payload is desired.

 

We are currently building and running the Tick42 RMDS bridge against OpenMAMA libraries with the patch applied. The new function is used something like this (with conditional compilation to show the ‘old’ version)

 

              // Prepare the OpenMAMA dictionary part of the message

#if defined(MAMA_DICTIONARY_PATCH)

              // provided mama has been patched for the new dictionary function we can create our own message on our own payload

              mamaMsg dictMsg=NULL;

              mamaMsg_createForPayload(&dictMsg, 'P');

              mama_status res = mamaDictionary_fillDictionaryMessage(dictionary, &dictMsg);

#else

              mamaMsg dictMsg=NULL;

              mama_status res = mamaDictionary_getDictionaryMessage (dictionary, &dictMsg);

#endif

 

 

As I said before, in theory, it shouldn’t matter which payload a dictionary message uses, but in a context when multiple bridges are loaded it’s desirable to know which code is being executed.

 

I’m interested to hear from other bridge developers any thoughts, opiniions or questions on this subject

 

Best regards

 

Tom

 

The patch is also shown below

 

 

 

diff --git a/README b/README

index be1ad38..f278d0d 100644

--- a/README

+++ b/README

@@ -2,7 +2,7 @@ OpenMAMA Client Library

============================

 Release: 2.3.1

-Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/heads/OpenMAMA-2.3.1

+Change Log: http://git.openmama.org/?p=OpenMAMA.git;a=shortlog;h=refs/tags/OpenMAMA-2.3.1-release

 Project Page

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

diff --git a/mama/c_cpp/src/c/dictionary.c b/mama/c_cpp/src/c/dictionary.c

index 7f7d605..8a6d275 100644

--- a/mama/c_cpp/src/c/dictionary.c

+++ b/mama/c_cpp/src/c/dictionary.c

@@ -496,6 +496,21 @@ mamaDictionary_getDictionaryMessage (

}

 mama_status

+             mamaDictionary_fillDictionaryMessage (

+             mamaDictionary dictionary,

+             mamaMsg* msg)

+{

+             mamaDictionaryImpl* impl = (mamaDictionaryImpl*)dictionary;

+

+             if (!impl) return MAMA_STATUS_NULL_ARG;

+             if (!msg) return MAMA_STATUS_INVALID_ARG;

+

+             populateMessageFromDictionary (impl, *msg);

+

+             return MAMA_STATUS_OK;

+}

+

+mama_status

mamaDictionary_createFieldDescriptor (

                 mamaDictionary       dictionary,

                 mama_fid_t           fid,

diff --git a/mama/c_cpp/src/c/mama/dictionary.h b/mama/c_cpp/src/c/mama/dictionary.h

index 0eda958..40f7885 100644

--- a/mama/c_cpp/src/c/mama/dictionary.h

+++ b/mama/c_cpp/src/c/mama/dictionary.h

@@ -268,6 +268,22 @@ mamaDictionary_getDictionaryMessage (

     mamaMsg* msg);

 /**

+ * Fill a message with the data dictionary.

+ *

+ * An existing mama message is populated fromt he data dictionary

+ * This allows the caller to create the message on a specifc payload

+ *

+ * @param dictionary The Dictionary

+ * @param msg The address of the mamaMsg where the result is to be written

+ */

+MAMAExpDLL

+extern mama_status

+mamaDictionary_fillDictionaryMessage (

+    mamaDictionary dictionary,

+    mamaMsg* msg);

+

+

+/**

  * Create a new field descriptor and add it to the dictionary.

  * New fields can be added to an existing dictionary obtained

  * from the MAMA infrastructure. This function can also be used

 

 

 

 

 

 

From: Tom Doust
Sent: 29 August 2014 10:12 AM
To: Openmama-dev@...
Subject: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com  


 

 


Re: C99 support in OpenMama

Damian Maguire
 

Hey Benjamin, 

At present there are no firm plans to move towards full C99 support in OpenMAMA, at least until we see a much broader adoption of VS2013 - we always have to keep in mind the breadth of the current MAMA install base, and ensure that we can always build OpenMAMA to be compatible with it. Unfortunately this limits the scope for adopting newer tool chains/language specs.

In the Linux case, we compile with support for C99, but we don't use a number of the features which are missing within earlier VS versions (mixed declarations being the standard example). This is actually necessary since we rely on some C99 features being available (long long for example), which don't appear with C90. 

Hopefully that makes sense, but fire away if you have any other questions. 

Cheers, 

Damian 




On Tue, Sep 2, 2014 at 9:54 AM, Benjamin Taieb <benjamin.taieb@...> wrote:

Hi everyone,

I noticed that when compiling on Linux, flag -std=gnu99 is set, meaning support for C99.

 

However, on windows, VS started supporting C99 from VS2013:

http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx

 

Is that the intention that windows build will be moved to VS2013 and C99 used ?

 

I have my windows build against VS2012 at the moment, and I'm curious to get others openmamers (I just made that up) thoughts, experiences.

 

Cheers,

Ben.

 


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev



Re: Wombat Queue Destroy

Damian Maguire
 

Hey Sam,

Unfortunately this is a weakness in the API for the Wombat Queue implementation - it really should have a wombatQueue_deallocate, but it isn't presently available. If you'd like to raise an issue in bugzilla (bugs.openmama.org) we can look at getting it added. Better yet, we'd be happy to accept a patch which addresses the issue in the queue.

Thanks, 

Damian


On Tue, Sep 2, 2014 at 7:20 PM, Sam Wilson <Sam.Wilson@...> wrote:
Hello!

I'm trying to use Wombat Queue, but I can't figure out how to safely
free a queue when the creation fails. Here's my example:

     wombatQueue queue;
     wombatQueueStatus status = wombatQueue_allocate(&queue);
     if (WOMBAT_QUEUE_OK != status) {
         return; // log the error state or what have you
     }

     status = wombatQueue_create(queue, MAX_SIZE, INITIAL_SIZE,
                                 CHUNK_SIZE);
     if (WOMBAT_QUEUE_OK != status) {
         wombatQueue_destroy(queue); // Doesn't work because the
                                     // queue hasn't been created.

         // So how do I free the memory allocated by
         // wombatQueue_allocate?
     }

Thanks for your help,
Sam
_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev


Wombat Queue Destroy

Sam Wilson <Sam.Wilson@...>
 

Hello!

I'm trying to use Wombat Queue, but I can't figure out how to safely
free a queue when the creation fails. Here's my example:

wombatQueue queue;
wombatQueueStatus status = wombatQueue_allocate(&queue);
if (WOMBAT_QUEUE_OK != status) {
return; // log the error state or what have you
}

status = wombatQueue_create(queue, MAX_SIZE, INITIAL_SIZE,
CHUNK_SIZE);
if (WOMBAT_QUEUE_OK != status) {
wombatQueue_destroy(queue); // Doesn't work because the
// queue hasn't been created.

// So how do I free the memory allocated by
// wombatQueue_allocate?
}

Thanks for your help,
Sam


C99 support in OpenMama

Benjamin Taieb
 

Hi everyone,

I noticed that when compiling on Linux, flag -std=gnu99 is set, meaning support for C99.

 

However, on windows, VS started supporting C99 from VS2013:

http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx

 

Is that the intention that windows build will be moved to VS2013 and C99 used ?

 

I have my windows build against VS2012 at the moment, and I'm curious to get others openmamers (I just made that up) thoughts, experiences.

 

Cheers,

Ben.

 


Re: problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Damian Maguire
 

Hey Tom, 

I think the idea of an additional method for populating a message with a dictionary is spot on - something which passes in a pre-created message and fills it with the dictionary contents as in your second suggestion seems like a good fit to me. If you'd like to put together a patch and send it through to the list, I think that would help get the discussion going and maybe shake out some usecases we haven't thought of. 

Cheers, 

Damian


On Fri, Aug 29, 2014 at 10:12 AM, Tom Doust <tom.doust@...> wrote:

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com  


 

 


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev



problem with mamaDictionary_getDictionaryMessage when multiple bridges are loaded

Tom Doust
 

Hi

 

mama_status mamaDictionary_getDictionaryMessage (mamaDictionary dictionary,mamaMsg* msg)

 

 

creates the message it returns using mamaMsg_create (&tempMsg); this creates the message using the default payload which may not be the payload type for the bridge that is trying to populate a message with its dictionary.

 

Now, while in theory it shouldn’t really matter, in the real world it does, for a variety of reasons.

 

I can see 2 possible solutions, one is to extend the existing function signature to carry a payload id (or a bridge) so that a payload specific mamaMsg can be created, or better, implement a second function that allows the caller to pre-create the message that is passed in. This second solution would not affect any existing code.

 

I’ll create and submit a patch, but before I do I’m soliciting comments and proposals for better solutions.

 

 

Tom

 

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com  


 

 


Re: windows/*.h headers file missing in windows build.

Damian Maguire
 

In this instance I believe not - since the main windows folder contains a great large amount of source code, it may also eventually also contain some non-public headers, which wouldn't be considered for part of a release. Specifying each header in the SConscript ensures that a deliberate action is taken to expose the headers (and ensures that major changes aren't required if a non-public header is required later), and limits the possibility that things will fall out accidentally. The other folder being globbed is a different situation, since it should always only contain public headers.

Thanks, 

Damian


On Thu, Aug 28, 2014 at 12:43 PM, Benjamin Taieb <benjamin.taieb@...> wrote:

Hi Damian,

Looked at the diff, wouldn't you do

 

winheaders = Glob('windows/*.h')

 

to be sure to capture any further windows headers ?

Cheers,

Ben.

 

From: Damian Maguire [mailto:damian@...]
Sent: 28 August 2014 10:44
To: Benjamin Taieb
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] windows/*.h headers file missing in windows build.

 

Hey Benjamin, 

 

Thanks for pointing that one out, it does look like a bug with the common SConscript.win. I've pushed out a fix for it into next, if you'd like to give it a look now.

 

Cheers, 

 

Damian

 

On Thu, Aug 28, 2014 at 7:45 AM, Benjamin Taieb <benjamin.taieb@...> wrote:

Hi list,

When comparing the  binaries release

http://www.openmama.org/sites/default/files/openmama_2.3.1_WIN32-dynamic.zip

and what I get through compiling from source, the windows headers file (mman.h anfd lock.h) are not included.

Further investigation show that common\c_cpp\src\c\SConscript.win is missing to install windows headers file.

 

Is that a bug for which I should submit a patch or these headers are not suppose to be in the distribution ?

 

Cheers,

Ben.


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev

 



Re: windows/*.h headers file missing in windows build.

Benjamin Taieb
 

Hi Damian,

Looked at the diff, wouldn't you do

 

winheaders = Glob('windows/*.h')

 

to be sure to capture any further windows headers ?

Cheers,

Ben.

 

From: Damian Maguire [mailto:damian@...]
Sent: 28 August 2014 10:44
To: Benjamin Taieb
Cc: openmama-dev@...
Subject: Re: [Openmama-dev] windows/*.h headers file missing in windows build.

 

Hey Benjamin, 

 

Thanks for pointing that one out, it does look like a bug with the common SConscript.win. I've pushed out a fix for it into next, if you'd like to give it a look now.

 

Cheers, 

 

Damian

 

On Thu, Aug 28, 2014 at 7:45 AM, Benjamin Taieb <benjamin.taieb@...> wrote:

Hi list,

When comparing the  binaries release

http://www.openmama.org/sites/default/files/openmama_2.3.1_WIN32-dynamic.zip

and what I get through compiling from source, the windows headers file (mman.h anfd lock.h) are not included.

Further investigation show that common\c_cpp\src\c\SConscript.win is missing to install windows headers file.

 

Is that a bug for which I should submit a patch or these headers are not suppose to be in the distribution ?

 

Cheers,

Ben.


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev

 


Re: windows/*.h headers file missing in windows build.

Damian Maguire
 

Hey Benjamin, 

Thanks for pointing that one out, it does look like a bug with the common SConscript.win. I've pushed out a fix for it into next, if you'd like to give it a look now.

Cheers, 

Damian


On Thu, Aug 28, 2014 at 7:45 AM, Benjamin Taieb <benjamin.taieb@...> wrote:

Hi list,

When comparing the  binaries release

http://www.openmama.org/sites/default/files/openmama_2.3.1_WIN32-dynamic.zip

and what I get through compiling from source, the windows headers file (mman.h anfd lock.h) are not included.

Further investigation show that common\c_cpp\src\c\SConscript.win is missing to install windows headers file.

 

Is that a bug for which I should submit a patch or these headers are not suppose to be in the distribution ?

 

Cheers,

Ben.


_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev



windows/*.h headers file missing in windows build.

Benjamin Taieb
 

Hi list,

When comparing the  binaries release

http://www.openmama.org/sites/default/files/openmama_2.3.1_WIN32-dynamic.zip

and what I get through compiling from source, the windows headers file (mman.h anfd lock.h) are not included.

Further investigation show that common\c_cpp\src\c\SConscript.win is missing to install windows headers file.

 

Is that a bug for which I should submit a patch or these headers are not suppose to be in the distribution ?

 

Cheers,

Ben.


[PATCH] Modification to playbackFileparser.c

Adrienne Ambrose <AAmbrose@...>
 

TESTING:-

No middleware dependencies.

No O/S dependencies.

 

Problem:-

Currently this will create a msg using the default payload rather than the payload in the file.

To expose this create a file using qpid msg then try to load wih default payload set to avis msg.

 

The below patch will resolve this issue.

 

 

PATCH:- 0001-Modification-to-playbackFileParser.c

From 0c0938fd90243753feb8997f306545c7551c51b1 Mon Sep 17 00:00:00 2001

From: A Ambrose <aambrose@...>

Date: Mon, 25 Aug 2014 12:10:26 +0100

Subject: [PATCH] Modification to playbackFileParser.c

Currently this will create a msg using the default payload rather than the

payload in the file.

 

[OMAMA-283]

Signed-off-by: A Ambrose <aambrose@...>

---

mama/c_cpp/src/c/playback/playbackFileParser.c |    2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

 

diff --git a/mama/c_cpp/src/c/playback/playbackFileParser.c b/mama/c_cpp/src/c/playback/playbackFileParser.c

index c8f1717..0f2849c 100644

--- a/mama/c_cpp/src/c/playback/playbackFileParser.c

+++ b/mama/c_cpp/src/c/playback/playbackFileParser.c

@@ -79,6 +79,7 @@ mama_status mamaPlaybackFileParser_init (mamaPlaybackFileParser

     impl->myMamaMsgLen  = 0;

     impl->myMaxMsgLen   = 0;

     impl->myMsgBuffer   = NULL;

+    impl->myMamaMsg    = NULL;

     return MAMA_STATUS_OK;

}

@@ -98,7 +99,6 @@ mamaPlaybackFileParser_allocate (mamaPlaybackFileParser* fileParser)

     {

         return MAMA_STATUS_NOMEM;

     }

-              mamaMsg_create(&impl->myMamaMsg);

     mamaPlaybackFileParser_init (impl);

     *fileParser = (mamaPlaybackFileParserImpl*)impl;

--

1.7.1

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


[PATCH] mama & mamda apps do not flush data to log

Adrienne Ambrose <AAmbrose@...>
 

TESTING:-

Not O/S or middleware specific. 
Checked  example apps, all languages & on different middlewares to confirm that data is now flushed when redirected to file.
Specifically:-

1. mamapublisherc / mamapublishercpp
2. mamasubscriberc / mamasubscribercpp
3. mamainboxc / mamainboxcpp
4. mamaftmemberc / mamaftmembercpp

 

PATCH:- 0003-Mama-Mamda-apps-do-not-flush-data-to-log

From 519e59b5d03f4782a6c134db68c4853620e1e13c Mon Sep 17 00:00:00 2001

From: A Ambrose <aambrose@...>

Date: Thu, 21 Aug 2014 14:06:51 +0100

Subject: [PATCH 3/3] Mama & Mamda apps do not flush data to log

 

Modification to the mama & mamda example applications to flush data when logged to file.

All languages, C, C++, C# & Java.

[OMAMA-278/OMAMA-279]

Signed-off-by: A Ambrose <aambrose@...>

---

mama/c_cpp/src/examples/c/mamaftmemberc.c          |    3 +++

mama/c_cpp/src/examples/c/mamainboxc.c             |    2 ++

mama/c_cpp/src/examples/c/mamaio.c                 |    2 ++

mama/c_cpp/src/examples/c/mamalistenc.c            |    1 +

mama/c_cpp/src/examples/c/mamalistencachedc.c      |    1 +

mama/c_cpp/src/examples/c/mamamultisubscriberc.c   |    2 ++

mama/c_cpp/src/examples/c/mamaproxyc.c             |    2 ++

mama/c_cpp/src/examples/c/mamapublisherc.c         |    2 ++

mama/c_cpp/src/examples/c/mamasubscriberc.c        |    2 ++

.../src/examples/c/mamasymbollistsubscriberc.c     |    1 +

mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp     |    1 +

mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp    |    2 ++

mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp       |    2 ++

mama/c_cpp/src/examples/cpp/mamaiocpp.cpp          |    2 ++

.../c_cpp/src/examples/cpp/mamalistencachedcpp.cpp |    1 +

mama/c_cpp/src/examples/cpp/mamalistencpp.cpp      |    1 +

.../c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp |    2 ++

mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp       |    2 ++

mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp   |    2 ++

mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp  |    2 ++

.../examples/cpp/mamasymbollistsubscribercpp.cpp   |    2 ++

.../MamaMultiSubscriber/MamaMultiSubscriberCS.cs   |    1 +

.../examples/MamaSubscriber/MamaSubscriberCS.cs    |    1 +

.../src/com/wombat/mama/examples/MamaListen.java   |    3 +++

.../wombat/mama/examples/MamaSubscriberJava.java   |    1 +

mamda/c_cpp/src/examples/auctionticker.cpp         |    2 ++

mamda/c_cpp/src/examples/comboticker.cpp           |    2 ++

mamda/c_cpp/src/examples/currencyticker.cpp        |    2 ++

mamda/c_cpp/src/examples/fundamentallisten.cpp     |    2 ++

mamda/c_cpp/src/examples/mamdalisten.cpp           |    2 ++

mamda/c_cpp/src/examples/mamdapublisher.cpp        |    1 +

mamda/c_cpp/src/examples/multipartticker.cpp       |    2 ++

mamda/c_cpp/src/examples/multisecurityticker.cpp   |    2 ++

mamda/c_cpp/src/examples/news/newsticker.cpp       |    2 ++

mamda/c_cpp/src/examples/optionchainer.cpp         |    2 ++

mamda/c_cpp/src/examples/optionview.cpp            |    2 ++

.../src/examples/orderbooks/atomicbookbuilder.cpp  |    2 ++

.../src/examples/orderbooks/atomicbookticker.cpp   |    3 ++-

mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp  |    2 ++

.../src/examples/orderbooks/bookpublisher.cpp      |    1 +

mamda/c_cpp/src/examples/orderbooks/bookticker.cpp |    1 +

mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp |    2 ++

.../examples/orderbooks/listenerBookPublisher.cpp  |    1 +

.../src/examples/orderbooks/test/bookiters.cpp     |    2 ++

.../src/examples/orderbooks/test/bookselftest.cpp  |    2 ++

.../src/examples/orderbooks/test/randomaccess.cpp  |    3 ++-

mamda/c_cpp/src/examples/orderimbalanceticker.cpp  |    2 ++

mamda/c_cpp/src/examples/quoteticker.cpp           |    2 ++

mamda/c_cpp/src/examples/secstatuslisten.cpp       |    2 ++

mamda/c_cpp/src/examples/tradeticker.cpp           |    2 ++

.../examples/MamdaBookTicker/MamdaBookTicker.cs    |    3 +++

.../MamdaExamplesCommon/CommandLineProcessor.cs    |    1 +

.../MamdaOptionChainExample.cs                     |    2 ++

.../mamda/examples/CommandLineProcessor.java       |    1 +

.../mamda/examples/MamdaAtomicBookBuilder.java     |    4 ++++

.../mamda/examples/MamdaAtomicBookTicker.java      |    1 +

.../com/wombat/mamda/examples/MamdaBookTicker.java |    6 ++++++

.../com/wombat/mamda/examples/MamdaListen.java     |    1 +

.../mamda/examples/MamdaOptionChainExample.java    |    2 ++

.../mamda/examples/MamdaOrderImbalanceTicker.java  |    1 +

60 files changed, 111 insertions(+), 2 deletions(-)

 

diff --git a/mama/c_cpp/src/examples/c/mamaftmemberc.c b/mama/c_cpp/src/examples/c/mamaftmemberc.c

index 40576ce..d5d6f1a 100644

--- a/mama/c_cpp/src/examples/c/mamaftmemberc.c

+++ b/mama/c_cpp/src/examples/c/mamaftmemberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport     = NULL;

static mamaFtMember     gFtMember      = NULL;

@@ -72,6 +73,8 @@ static void MAMACALLTYPE onFtStateChangeCb (mamaFtMember  ftMember,

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

+

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamainboxc.c b/mama/c_cpp/src/examples/c/mamainboxc.c

index a1ebf99..4a1275e 100644

--- a/mama/c_cpp/src/examples/c/mamainboxc.c

+++ b/mama/c_cpp/src/examples/c/mamainboxc.c

@@ -22,6 +22,7 @@

#include "wombat/port.h"

#include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport    = NULL;

static mamaInbox        gInbox        = NULL;

@@ -94,6 +95,7 @@ static void createIntervalTimer (void)

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine(argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamaio.c b/mama/c_cpp/src/examples/c/mamaio.c

index 2f6a9d6..d092ad3 100644

--- a/mama/c_cpp/src/examples/c/mamaio.c

+++ b/mama/c_cpp/src/examples/c/mamaio.c

@@ -34,6 +34,7 @@

#include <sys/types.h>

#include <errno.h>

#include <string.h>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/io.h"

@@ -57,6 +58,7 @@ ioCallback          (mamaIo io, mamaIoType ioType, void *closure);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamalistenc.c b/mama/c_cpp/src/examples/c/mamalistenc.c

index 223746b..6e59e40 100644

--- a/mama/c_cpp/src/examples/c/mamalistenc.c

+++ b/mama/c_cpp/src/examples/c/mamalistenc.c

@@ -322,6 +322,7 @@ int main (int argc, const char **argv)

     gSubscriptionList = (mamaSubscription*)calloc (MAX_SUBSCRIPTIONS,

                                                    sizeof (mamaSubscription));

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     if (gNumSymbols == 0 && !gPrintVersionAndExit)

diff --git a/mama/c_cpp/src/examples/c/mamalistencachedc.c b/mama/c_cpp/src/examples/c/mamalistencachedc.c

index 8d683b9..db6d3ee 100644

--- a/mama/c_cpp/src/examples/c/mamalistencachedc.c

+++ b/mama/c_cpp/src/examples/c/mamalistencachedc.c

@@ -323,6 +323,7 @@ int main (int argc, const char **argv)

     gSubscriptionList = (mamaSubscription*)calloc (MAX_SUBSCRIPTIONS,

                                                    sizeof (mamaSubscription));

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     if (gNumSymbols == 0 && !gPrintVersionAndExit)

diff --git a/mama/c_cpp/src/examples/c/mamamultisubscriberc.c b/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

index 8282650..85688f0 100644

--- a/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamamultisubscriberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

#define MAX_BRIDGES 10

 static const char *     gTopic              = "MAMA_TOPIC";

@@ -86,6 +87,7 @@ msgCb (mamaSubscription       subscription,

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     gMamaMiddlewares = (const char**)

                        calloc (MAX_BRIDGES, sizeof (char*));

     gMamaBridges     = (mamaBridge*)

diff --git a/mama/c_cpp/src/examples/c/mamaproxyc.c b/mama/c_cpp/src/examples/c/mamaproxyc.c

index 40ebbb5..988c96b 100644

--- a/mama/c_cpp/src/examples/c/mamaproxyc.c

+++ b/mama/c_cpp/src/examples/c/mamaproxyc.c

@@ -28,6 +28,7 @@

#include "mama/dqpublisher.h"

#include "mama/dqpublishermanager.h"

#include "string.h"

+#include <stdio.h>

 static const char *  gUsageString[] =

{

@@ -285,6 +286,7 @@ syncCallback (mamaTimer timer, void* closure)

int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     gSymbolList = (const char**)calloc (MAX_SUBSCRIPTIONS, sizeof (char*));

     parseCommandLine (argc, argv);

diff --git a/mama/c_cpp/src/examples/c/mamapublisherc.c b/mama/c_cpp/src/examples/c/mamapublisherc.c

index 87e4657..02128fa 100644

--- a/mama/c_cpp/src/examples/c/mamapublisherc.c

+++ b/mama/c_cpp/src/examples/c/mamapublisherc.c

@@ -23,6 +23,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport      = NULL;

static mamaTimer        gTimer          = NULL;

@@ -87,6 +88,7 @@ static void usage               (int exitStatus);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamasubscriberc.c b/mama/c_cpp/src/examples/c/mamasubscriberc.c

index e41dfc7..dec55e2 100644

--- a/mama/c_cpp/src/examples/c/mamasubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamasubscriberc.c

@@ -21,6 +21,7 @@

 #include "mama/mama.h"

#include "string.h"

+#include <stdio.h>

 static mamaTransport    gTransport     = NULL;

static mamaSubscription gSubscription  = NULL;

@@ -95,6 +96,7 @@ static void usage (int  exitStatus);

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c b/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

index 6067146..8ffbc60 100644

--- a/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

+++ b/mama/c_cpp/src/examples/c/mamasymbollistsubscriberc.c

@@ -158,6 +158,7 @@ int main (int argc, const char **argv)

                                                    sizeof (mamaSubscription));

 

+    setbuf (stdout, NULL);

     memset(&symbolListCallbacks, 0, sizeof(symbolListCallbacks));

     symbolListCallbacks.onMsg          = symbolListSubscriptionOnMsg;

     symbolListCallbacks.onCreate       = symbolListSubscriptionOnCreate;

diff --git a/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp b/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

index 451d414..524492b 100644

--- a/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaentitlecpp.cpp

@@ -1009,6 +1009,7 @@ void MamaEntitle::unsubscribeFromSymbols (void)

int main (int argc, const char** argv)

{

     MamaEntitle  mMamaEntitle;

+    setbuf (stdout, NULL);

     mMamaEntitle.parseCommandLine (argc, argv);

     if (mMamaEntitle.hasSymbols ())

diff --git a/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp b/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

index 498fbf2..9c9af9c 100644

--- a/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaftmembercpp.cpp

@@ -25,6 +25,7 @@

#include <mama/log.h>

#include <iostream>

#include <stdlib.h>

+#include <stdio.h>

 using namespace Wombat;

using namespace std;

@@ -77,6 +78,7 @@ private:

  *****************************************************************************/

int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         FtMemberDemo ftDemo;

diff --git a/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp b/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

index c60c426..77d6c70 100644

--- a/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamainboxcpp.cpp

@@ -39,6 +39,7 @@ using std::cerr;

using std::cout;

using std::endl;

+#include <stdio.h>

#include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -64,6 +65,7 @@ static void sendRequest         (void);

int main (int argc, const char **argv)

{

     int i = 0;

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp b/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

index 54cf14c..c38d141 100644

--- a/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaiocpp.cpp

@@ -37,6 +37,7 @@

#include "wombat/port.h"

#include <iostream>

#include <errno.h>

+#include <stdio.h>

 using std::cerr;

using std::cout;

@@ -65,6 +66,7 @@ static void createIOHandlers    (void);

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp b/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

index b7bd615..23e94b8 100644

--- a/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamalistencachedcpp.cpp

@@ -2020,6 +2020,7 @@ void MamaListen::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaListen  mMamaListen;

+    setbuf (stdout, NULL);

     mMamaListen.parseCommandLine (argc, argv);

     if (mMamaListen.hasSymbols ())

diff --git a/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp b/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

index 69c0035..082d00a 100644

--- a/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamalistencpp.cpp

@@ -1610,6 +1610,7 @@ void MamaListen::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaListen  mMamaListen;

+    setbuf (stdout, NULL);

     try

     {

diff --git a/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp b/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

index 7de86f5..c1a7ae0 100644

--- a/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamamsgpublishercpp.cpp

@@ -19,6 +19,7 @@

  * 02110-1301 USA

  */

+#include <stdio.h>

#include <iostream>

 using std::cerr;

@@ -121,6 +122,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     gBridge = Mama::loadBridge (gMiddleware);

     Mama::open ();

diff --git a/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp b/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

index 283382a..bbb311e 100644

--- a/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamaproxycpp.cpp

@@ -40,6 +40,7 @@

 #include "wombat/port.h"

#include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -530,6 +531,7 @@ void MamaProxy::shutdownMama ()

int main (int argc, const char **argv)

{

     MamaProxy  mMamaProxy;

+    setbuf (stdout, NULL);

     mMamaProxy.parseCommandLine (argc, argv);

    

     try

diff --git a/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp b/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

index 3d3f29a..c180f2b 100644

--- a/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamapublishercpp.cpp

@@ -39,6 +39,7 @@

  *---------------------------------------------------------------------------*/

 #include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -113,6 +114,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

     gBridge = Mama::loadBridge (gMiddleware);

diff --git a/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp b/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

index dda7f97..ef768e4 100644

--- a/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamasubscribercpp.cpp

@@ -35,6 +35,7 @@

  *---------------------------------------------------------------------------*/

 #include <iostream>

+#include <stdio.h>

 #include "mama/mama.h"

#include "mama/mamacpp.h"

@@ -85,6 +86,7 @@ static void usage                       (int exitStatus);

 int main (int argc, const char**  argv)

{

+    setbuf (stdout, NULL);

     parseCommandLine (argc, argv);

    

     initializeMama ();

diff --git a/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp b/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

index 75ce0e5..774a28c 100644

--- a/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

+++ b/mama/c_cpp/src/examples/cpp/mamasymbollistsubscribercpp.cpp

@@ -23,6 +23,7 @@

#include <iostream>

#include <list>

#include <string.h>

+#include <stdio.h>

 #include <mama/mamacpp.h>

@@ -370,6 +371,7 @@ void MamaSymbolListSubscriber::usage (int exitStatus)

int main (int argc, const char** argv)

{

     MamaSymbolListSubscriber mMamaSymbolListSubscriber;

+    setbuf (stdout, NULL);

     mMamaSymbolListSubscriber.parseCommandLine (argc, argv);

    

     try

diff --git a/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs b/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

index c4f5606..d0a62a5 100644

--- a/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

+++ b/mama/dotnet/src/examples/MamaMultiSubscriber/MamaMultiSubscriberCS.cs

@@ -238,6 +238,7 @@ namespace Wombat

                                                                                                  Console.WriteLine(String.Format("{0,20}",field.getAsString()));

                                                                                                  break;

                                                                  }

+                   Console.Out.Flush();

                                                  }

        

                                private void displayAllFields(MamaMsg msg)

diff --git a/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs b/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

index 39c6956..a4d0939 100644

--- a/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

+++ b/mama/dotnet/src/examples/MamaSubscriber/MamaSubscriberCS.cs

@@ -200,6 +200,7 @@ namespace Wombat

                     Console.WriteLine(String.Format("{0,20}",field.getAsString()));

                     break;

             }

+            Console.Out.Flush();

         }

         

         private void displayAllFields(MamaMsg msg)

diff --git a/mama/jni/src/com/wombat/mama/examples/MamaListen.java b/mama/jni/src/com/wombat/mama/examples/MamaListen.java

index c6aeb7a..e3b0c47 100644

--- a/mama/jni/src/com/wombat/mama/examples/MamaListen.java

+++ b/mama/jni/src/com/wombat/mama/examples/MamaListen.java

@@ -555,6 +555,7 @@ public class MamaListen

             System.err.println ("No subjects specified");

             System.exit (1);

         }

+        System.out.flush();

     }

     private static void print (final String what, final int width)

@@ -573,6 +574,7 @@ public class MamaListen

            

             System.out.print (sb.toString());

         }

+        System.out.flush();

     }

     private static void parseCommandLine (final String[] args)

@@ -1070,6 +1072,7 @@ public class MamaListen

                     System.out.println ("Field not found in message.");

                 }

             }

+            System.out.flush();

         }

         private synchronized void displayAllFields(

diff --git a/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java b/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

index ad5a3c6..96609af 100644

--- a/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

+++ b/mama/jni/src/com/wombat/mama/examples/MamaSubscriberJava.java

@@ -340,6 +340,7 @@ public class MamaSubscriberJava

             sb.append(" ");

        

         System.out.print(sb.toString());

+        System.out.flush();

     }

    

     private static class SubscriptionCallback

diff --git a/mamda/c_cpp/src/examples/auctionticker.cpp b/mamda/c_cpp/src/examples/auctionticker.cpp

index 3b0aaa9..d6cff60 100644

--- a/mamda/c_cpp/src/examples/auctionticker.cpp

+++ b/mamda/c_cpp/src/examples/auctionticker.cpp

@@ -32,6 +32,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -119,6 +120,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/comboticker.cpp b/mamda/c_cpp/src/examples/comboticker.cpp

index d6ded8f..399338c 100644

--- a/mamda/c_cpp/src/examples/comboticker.cpp

+++ b/mamda/c_cpp/src/examples/comboticker.cpp

@@ -37,6 +37,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include <mama/MamaQueueGroup.h>

@@ -351,6 +352,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

        

diff --git a/mamda/c_cpp/src/examples/currencyticker.cpp b/mamda/c_cpp/src/examples/currencyticker.cpp

index 88534d1..8f98682 100644

--- a/mamda/c_cpp/src/examples/currencyticker.cpp

+++ b/mamda/c_cpp/src/examples/currencyticker.cpp

@@ -31,6 +31,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -110,6 +111,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/fundamentallisten.cpp b/mamda/c_cpp/src/examples/fundamentallisten.cpp

index a7bb02b..27fb3fe 100644

--- a/mamda/c_cpp/src/examples/fundamentallisten.cpp

+++ b/mamda/c_cpp/src/examples/fundamentallisten.cpp

@@ -29,6 +29,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -63,6 +64,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/mamdalisten.cpp b/mamda/c_cpp/src/examples/mamdalisten.cpp

index 943e82a..b8b301d 100644

--- a/mamda/c_cpp/src/examples/mamdalisten.cpp

+++ b/mamda/c_cpp/src/examples/mamdalisten.cpp

@@ -27,6 +27,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -82,6 +83,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/mamdapublisher.cpp b/mamda/c_cpp/src/examples/mamdapublisher.cpp

index 64f80b5..4e90e6b 100644

--- a/mamda/c_cpp/src/examples/mamdapublisher.cpp

+++ b/mamda/c_cpp/src/examples/mamdapublisher.cpp

@@ -162,6 +162,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         MamdaPublisher* mMamdaPublisher = new MamdaPublisher;

diff --git a/mamda/c_cpp/src/examples/multipartticker.cpp b/mamda/c_cpp/src/examples/multipartticker.cpp

index 3086feb..5be33e1 100644

--- a/mamda/c_cpp/src/examples/multipartticker.cpp

+++ b/mamda/c_cpp/src/examples/multipartticker.cpp

@@ -34,6 +34,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -337,6 +338,7 @@ public:

 int main (int argc, const char* argv[])

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/multisecurityticker.cpp b/mamda/c_cpp/src/examples/multisecurityticker.cpp

index 0a0fd46..d8f6068 100644

--- a/mamda/c_cpp/src/examples/multisecurityticker.cpp

+++ b/mamda/c_cpp/src/examples/multisecurityticker.cpp

@@ -34,6 +34,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -317,6 +318,7 @@ public:

 int main (int argc, const char* argv[])

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/news/newsticker.cpp b/mamda/c_cpp/src/examples/news/newsticker.cpp

index 3d3ae42..85fd097 100644

--- a/mamda/c_cpp/src/examples/news/newsticker.cpp

+++ b/mamda/c_cpp/src/examples/news/newsticker.cpp

@@ -28,6 +28,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include <mama/MamaQueueGroup.h>

#include <mama/MamaSource.h>

#include "../parsecmd.h"

@@ -244,6 +245,7 @@ int main (int argc, const char **argv)

         NewsTicker*         aTicker        = new NewsTicker;

         mamaBridge          bridge         = NULL;

+        setbuf (stdout, NULL);

         CommonCommandLineParser     cmdLine (argc, argv);

        

         bridge = cmdLine.getBridge();

diff --git a/mamda/c_cpp/src/examples/optionchainer.cpp b/mamda/c_cpp/src/examples/optionchainer.cpp

index 1fbf3ad..9afca04 100644

--- a/mamda/c_cpp/src/examples/optionchainer.cpp

+++ b/mamda/c_cpp/src/examples/optionchainer.cpp

@@ -51,6 +51,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -569,6 +570,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/optionview.cpp b/mamda/c_cpp/src/examples/optionview.cpp

index 7bf7085..3295f6f 100644

--- a/mamda/c_cpp/src/examples/optionview.cpp

+++ b/mamda/c_cpp/src/examples/optionview.cpp

@@ -56,6 +56,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -553,6 +554,7 @@ private:

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp b/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

index af39747..75b6cbb 100644

--- a/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/atomicbookbuilder.cpp

@@ -39,6 +39,7 @@

#include <vector>

#include <stdexcept>

#include <iomanip>

+#include <stdio.h>

 #include <mamda/MamdaOrderBook.h>

#include <mamda/MamdaOrderBookPriceLevel.h>

@@ -854,6 +855,7 @@ int main (int argc, const char** argv)

{

     MamaQueueGroup*             queues = NULL;

     mamaBridge                  bridge = NULL;

+    setbuf (stdout, NULL);

     try

     {

         // Initialize the MAMA API

diff --git a/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp b/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

index 1aac0ab..287712d 100644

--- a/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/atomicbookticker.cpp

@@ -39,7 +39,7 @@

#include <vector>

#include <stdexcept>

#include <iomanip>

-

+#include <stdio.h>

 using  std::endl;

using  std::vector;

@@ -226,6 +226,7 @@ int main (int argc, const char** argv)

{

     MamaQueueGroup*             queues = NULL;

     mamaBridge                  bridge = NULL;

+    setbuf (stdout, NULL);

     try

     {

         // Initialize the MAMA API

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp b/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

index c4b0013..a8aa5ad 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookchurn.cpp

@@ -35,6 +35,7 @@

#include "../dictrequester.h"

#include <list>

#include <fstream>

+#include <stdio.h>

 using std::exception;

using std::endl;

@@ -257,6 +258,7 @@ class StatsTimerCallback : public MamaTimerCallback

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp b/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

index 4bf1757..5528eb7 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookpublisher.cpp

@@ -255,6 +255,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         BookPublisher* mBookPublisher = new BookPublisher;

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp b/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

index 17150ba..a25ccc5 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookticker.cpp

@@ -479,6 +479,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser  cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp b/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

index 95c3888..d3bcc95 100644

--- a/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/bookviewer.cpp

@@ -35,6 +35,7 @@

#include <vector>

#include <stdexcept>

#include <ncurses.h>

+#include <stdio.h>

 #include <signal.h>

#include <unistd.h>

@@ -135,6 +136,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp b/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

index 919db57..b0602d4 100644

--- a/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/listenerBookPublisher.cpp

@@ -269,6 +269,7 @@ private:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         BookPublisher* mBookPublisher = new BookPublisher;

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp b/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

index 27590db..e955af3 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/bookiters.cpp

@@ -22,6 +22,7 @@

#include <mamda/MamdaOrderBook.h>

#include <mamda/MamdaOrderBookEntry.h>

#include <assert.h>

+#include <stdio.h>

 using namespace Wombat;

@@ -33,6 +34,7 @@ int main (int argc, const char** argv)

{

     MamaDateTime now;

     MamdaOrderBook  book;

+    setbuf (stdout, NULL);

     book.setSymbol (symbol);

     now.setToNow();

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp b/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

index 55ab0da..65b7d4c 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/bookselftest.cpp

@@ -37,6 +37,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

@@ -99,6 +100,7 @@ public:

 int main (int argc, const char** argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp b/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

index e706cbe..8d976df 100644

--- a/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

+++ b/mamda/c_cpp/src/examples/orderbooks/test/randomaccess.cpp

@@ -18,7 +18,7 @@

  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA

  * 02110-1301 USA

  */

-

+#include <stdio.h>

#include <mamda/MamdaOrderBook.h>

using namespace Wombat;

@@ -29,6 +29,7 @@ const char* symbol = "MSFT";

int main (int argc, const char** argv)

{

     MamdaOrderBook  book;

+    setbuf (stdout, NULL);

     book.setSymbol (symbol);

     // Populate an order book with N price levels ranging from 50.00

diff --git a/mamda/c_cpp/src/examples/orderimbalanceticker.cpp b/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

index 5c7b206..ee37a9d 100644

--- a/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

+++ b/mamda/c_cpp/src/examples/orderimbalanceticker.cpp

@@ -33,6 +33,7 @@

#include <iostream>

#include <stdexcept>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "mama/MamaQueueGroup.h"

#include "dictrequester.h"

@@ -128,6 +129,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/quoteticker.cpp b/mamda/c_cpp/src/examples/quoteticker.cpp

index 5cd4b5a..bc119fd 100644

--- a/mamda/c_cpp/src/examples/quoteticker.cpp

+++ b/mamda/c_cpp/src/examples/quoteticker.cpp

@@ -30,6 +30,7 @@

#include <stdexcept>

#include <iostream>

#include <vector>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -170,6 +171,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/c_cpp/src/examples/secstatuslisten.cpp b/mamda/c_cpp/src/examples/secstatuslisten.cpp

index bb31e62..ed0c187 100644

--- a/mamda/c_cpp/src/examples/secstatuslisten.cpp

+++ b/mamda/c_cpp/src/examples/secstatuslisten.cpp

@@ -28,6 +28,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -75,6 +76,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         // Process some command line arguments:

diff --git a/mamda/c_cpp/src/examples/tradeticker.cpp b/mamda/c_cpp/src/examples/tradeticker.cpp

index 21da990..0fa00d0 100644

--- a/mamda/c_cpp/src/examples/tradeticker.cpp

+++ b/mamda/c_cpp/src/examples/tradeticker.cpp

@@ -30,6 +30,7 @@

#include <iostream>

#include <vector>

#include <stdexcept>

+#include <stdio.h>

#include "parsecmd.h"

#include "dictrequester.h"

#include "mama/MamaQueueGroup.h"

@@ -202,6 +203,7 @@ public:

 int main (int argc, const char **argv)

{

+    setbuf (stdout, NULL);

     try

     {

         CommonCommandLineParser     cmdLine (argc, argv);

diff --git a/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs b/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

index b60e2cb..00dfb02 100644

--- a/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

+++ b/mamda/dotnet/src/examples/MamdaBookTicker/MamdaBookTicker.cs

@@ -299,6 +299,7 @@ namespace Wombat.Mamda.Examples

                                                               {

                                                                               Console.WriteLine("");

                                                               }

+                Console.Out.Flush();

                                               }

                                                public void prettyPrintEntries(MamdaOrderBook book)

@@ -345,6 +346,7 @@ namespace Wombat.Mamda.Examples

                                                                                               }

                                                                               }

                                                               }

+                Console.Out.Flush();

                                               }

                                                private void paddedPrint(object val, int padLen, bool padAfter)

@@ -388,6 +390,7 @@ namespace Wombat.Mamda.Examples

                                                                                               Console.Write (val);

                                                                               }

                                                               }

+                Console.Out.Flush();

                                               }

                               }

diff --git a/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs b/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

index f426101..95e7ff0 100644

--- a/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

+++ b/mamda/dotnet/src/examples/MamdaExamplesCommon/CommandLineProcessor.cs

@@ -305,6 +305,7 @@ namespace Wombat.Mamda.Examples

                                                               Console.Error.WriteLine(e.ToString());

                                                               Environment.Exit(0);

                                               }

+            Console.Out.Flush();

                               }

                                private string                                                     mSource         = "WOMBAT";

diff --git a/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs b/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

index b26a6ae..6ec799a 100644

--- a/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

+++ b/mamda/dotnet/src/examples/MamdaOptionChainExample/MamdaOptionChainExample.cs

@@ -279,6 +279,7 @@ namespace Wombat.Mamda.Examples

                                                                               Console.WriteLine();

                                                                               ++i;

                                                               }

+                Console.Out.Flush();

                                               }

                                                public void printContract(MamdaOptionContract  contract)

@@ -300,6 +301,7 @@ namespace Wombat.Mamda.Examples

                                                                               symbol + " " + exchange + ")  | " +

                                                                               lastPrice + " | " + bidPrice + " | " +

                                                                               askPrice + " | " + accVolume);

+                Console.Out.Flush();

                                               }

                                                public void printlnContract(MamdaOptionContract  contract)

diff --git a/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java b/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

index 9a559bf..048b7ee 100644

--- a/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

+++ b/mamda/java/com/wombat/mamda/examples/CommandLineProcessor.java

@@ -370,5 +370,6 @@ class CommandLineProcessor

             e.printStackTrace();

                 System.exit (0);

         }

+        System.out.flush();

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

index d62ab29..812e477 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookBuilder.java

@@ -425,6 +425,7 @@ public class MamdaAtomicBookBuilder

                 mEntry      = null;

                 mPriceLevel = null;

             }

+            System.out.flush();

         }

         public AtomicBookBuilder(

@@ -884,6 +885,7 @@ public class MamdaAtomicBookBuilder

             if (mQuietModeLevel<1)

                 System.out.println ("");

+            System.out.flush();

         }

         /*

@@ -984,6 +986,7 @@ public class MamdaAtomicBookBuilder

                     System.out.println ("");

                 }

             }

+            System.out.flush();

         }

 

@@ -1030,6 +1033,7 @@ public class MamdaAtomicBookBuilder

                     System.out.print (val);

                 }

             }

+            System.out.flush();

         }

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

index 95ff821..6b8c551 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaAtomicBookTicker.java

@@ -280,6 +280,7 @@ public class MamdaAtomicBookTicker

                 }

                 System.out.print ("\n");

             }

+            System.out.flush();

         }

    

         public void onBookAtomicLevelEntryRecap (

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

index a8a27d5..13a27c4 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaBookTicker.java

@@ -252,6 +252,7 @@ public class MamdaBookTicker

                 prettyPrint (delta);

             }

             prettyPrint (book);

+            System.out.flush();

         }

         public void onBookComplexDelta (MamdaSubscription          subscription,

@@ -319,6 +320,7 @@ public class MamdaBookTicker

                 System.out.print ("RECAP!!!  (seq# " + seqNum + ")\n");

             }

             prettyPrint (book);

+            System.out.flush();

         }

 

@@ -395,6 +397,7 @@ public class MamdaBookTicker

                 System.out.print (action);

                 System.out.print ("  \n");

             }

+            System.out.flush();

         }

         public void prettyPrintLevels (final MamdaOrderBook  book)

@@ -530,6 +533,7 @@ public class MamdaBookTicker

                

             if (mQuietModeLevel<1)

                 System.out.println ("");

+            System.out.flush();

         }

         public void prettyPrintEntries (final MamdaOrderBook book)

@@ -625,6 +629,7 @@ public class MamdaBookTicker

                     System.out.println ("");

                 }

             }

+            System.out.flush();

         }

         private static final String [] sPadding = new String[128];

@@ -668,6 +673,7 @@ public class MamdaBookTicker

                     System.out.print (val);

                 }

             }

+            System.out.flush();

         }

     }

}

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaListen.java b/mamda/java/com/wombat/mamda/examples/MamdaListen.java

index b79efdd..2463bb0 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaListen.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaListen.java

@@ -249,6 +249,7 @@ public class MamdaListen

             }

             System.out.print ("|");

             System.out.print (field.toString()+" \n");

+            System.out.flush();

         }

         public void  setDictionary (

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java b/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

index 64683d4..6b17439 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaOptionChainExample.java

@@ -336,6 +336,7 @@ public class MamdaOptionChainExample

                 System.out.println ();

                 ++i;

             }

+            System.out.flush();

         }

         public void printContract (MamdaOptionContract  contract)

@@ -369,6 +370,7 @@ public class MamdaOptionChainExample

                                   lastPrice + " | "   + bidPrice    + " | "   +

                                   askPrice  + " | "   + accVolume);

             }

+            System.out.flush();

         }

         public void printlnContract (MamdaOptionContract  contract)

diff --git a/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java b/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

index 28f8fc4..cc0946e 100644

--- a/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

+++ b/mamda/java/com/wombat/mamda/examples/MamdaOrderImbalanceTicker.java

@@ -240,5 +240,6 @@ public class MamdaOrderImbalanceTicker

         {

             System.out.println ("Error (" + subscription.getSymbol() + ")");

         }

+        System.out.flush();

     }

}

--

1.7.1

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


[PATCH] C# MamaFtMember bridged mode is not working

Adrienne Ambrose <AAmbrose@...>
 

TESTING:-

**Windows only** 
No middleware dependencies. 

Will need to run MamaFtMember c# in bridge mode, both before & after the fix.

Before the fix the previous version will hang,  after the addition of the of the incremented argument pointer it should run as expected.

 

PATCH:- 0002-C-MamaFtMember-bridged-mode-is-not-working

From 0240f6890c1bf511091a085c7077e31294b98d35 Mon Sep 17 00:00:00 2001

From: A Ambrose <aambrose@...>

Date: Thu, 21 Aug 2014 11:38:11 +0100

Subject: [PATCH 2/3] C# MamaFtMember bridged mode is not working

 

Modification to the MamaFtMember C# example application to fix bridged mode

as it previously did not work. The argument pointer was not being incremented.

[OMAMA-282]

 

Signed-off-by: A Ambrose <aambrose@...>

---

.../src/examples/MamaFtMember/MamaFtMemberCS.cs    |    1 +

1 files changed, 1 insertions(+), 0 deletions(-)

 

diff --git a/mama/dotnet/src/examples/MamaFtMember/MamaFtMemberCS.cs b/mama/dotnet/src/examples/MamaFtMember/MamaFtMemberCS.cs

index 6f96127..d318732 100644

--- a/mama/dotnet/src/examples/MamaFtMember/MamaFtMemberCS.cs

+++ b/mama/dotnet/src/examples/MamaFtMember/MamaFtMemberCS.cs

@@ -150,6 +150,7 @@ namespace Wombat

                                                               if (args[i].CompareTo ("-b") == 0)

                                                               {

                                                                               ft_type = (uint)mamaFtType.MAMA_FT_TYPE_BRIDGE;

+                                                                             i++;

                                                                               continue;

                                                               }

--

1.7.1

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


[PATCH] Reservedfieldsimpl.h missing declaration in openmama.

Adrienne Ambrose <AAmbrose@...>
 

TESTING:-

Again from list discussed with Damien -

Reservedfieldsimpl.h missing declaration in openmama.

 

This was a simple addition of missing declaration for cleanupReservedFields within reservedfieldsimpl.h

 

 

PATCH:- 0001-Addition-of-missing-declaration-for-cleanupReservedF

From ef5367a122a439e8f0a77eb16f6f7ae4cb24b6a8 Mon Sep 17 00:00:00 2001

From: A Ambrose <aambrose@...>

Date: Thu, 21 Aug 2014 11:33:21 +0100

Subject: [PATCH 1/3] Addition of missing declaration for cleanupReservedFields within rservedfieldsimpl.h

[OMAMA-281]

Signed-off-by: A Ambrose <aambrose@...>

 

---

mama/c_cpp/src/c/reservedfieldsimpl.h |    2 ++

1 files changed, 2 insertions(+), 0 deletions(-)

 

diff --git a/mama/c_cpp/src/c/reservedfieldsimpl.h b/mama/c_cpp/src/c/reservedfieldsimpl.h

index 5ee48ba..5dba8ab 100644

--- a/mama/c_cpp/src/c/reservedfieldsimpl.h

+++ b/mama/c_cpp/src/c/reservedfieldsimpl.h

@@ -30,6 +30,8 @@ extern "C" {

   API*/   

 extern void initReservedFields (void);

+extern void cleanupReservedFields (void);

+

#if defined(__cplusplus)

}

#endif

--

1.7.1

 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of Intercontinental Exchange, Inc. (ICE), Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.