Initial OpenMAMA-1.1 Commit

Adding all openMAMA-1.1 files for initial release.
Initial OpenMAMA-1.1 Commit

Adding all openMAMA-1.1 files for initial release.
Merge branch 'master' of ssh://git.openmama.org/OpenMAMA-1.1

Resolving conflicts in new COPYING file.
Conflicts:
	COPYING
build: Configure should fail and exit in common if flex is not installed

Modified common configure.ac to fail and exit with an error message if flex is
not installed. Also modified top level configure bash script to exit after
running configure in common if it fails rather than continuing and failing
randomly in the build.

Signed-off-by: Michael Schonberg <mschonberg@nyx.com>
Added additional build dependencies to README

Added the following depenencies to the README file:
  * flex
  * autoconf
  * automake
  * libtool
  * uuid-dev
These are based on what additional packages needed to be installed over a clean
Ubuntu 11.10 installation.

Changed the requiment for a C99 compiler to "gcc/g++". The unit tests require a
c++ compiler, and it is better to recommend a specific compiler that works. We
can add others if they are known to work.

Signed-off-by: Michael Schonberg <mschonberg@nyx.com>
BUILD: configure should fail by default with no bridge

Although it should be possible to build without a messaging or payload bridge,
this is not normally the desired result. To follow the principal of least
astonishment, configure for MAMA should fail if it fails to find a middleware or
payload bridge, unless passed parameters explicitly requesting a build without
them.

Add --without-middleware-bridge and --without-payload-bridge arguments to
configure.ac for MAMA. Tested the following permutations:

--with-avis | --without-payload-bridge | --without-middleware-bridge | result
-------------------------------------------------------------------------------
     Y      |         N                |              N              | pass
     Y      |         Y                |              N              | fail
     Y      |         N                |              Y              | fail
     Y      |         Y                |              Y              | fail
     N      |         Y                |              Y              | pass
     N      |         Y                |              N              | fail
     N      |         N                |              Y              | fail
     N      |         N                |              N              | fail

Signed-off-by: Michael Schonberg <mschonberg@nyx.com>
[transport] Added method to disable refreshes

Added method to disable refreshes for a transport. This method must be called
after mamaTransport_allocate() but before mamaTransport_create(). If invoked
with a non-zero argument the transport will not send refresh messages.

Signed-off-by: John Gray <jgray@nyx.com>
[common] Renamed hash functions to whash

Avoids potential namespace conflicts as the hash functions are now used
outside of common.

Signed-off-by: John Gray <jgray@nyx.com>
Include mama/types.h from mamainternal.h

The C++ wrappers require mama/types.h to be included from mamainternal.h in
order to build properly.

Signed-off-by: John Gray <jgray@nyx.com>
Fixed memory leak in properties

Free memory and fail if realloc fails in propertiesImpl_addKey(). When we
replace a value in the hash table in propertiesImpl_addProperty(), free the old
value.

Signed-off-by: John Gray <jgray@nyx.com>
Correctly log when the queue gets dereferenced too many times

The existing logic contained a race condition which would not consistently log
the attempt to dereference a queue with a zero reference count.

The interlocked variable also requires initialization. The methods are added as
no-ops in common/wombat/wInterlocked.h for Linux, but they will have
implementations for Windows.

Signed-off-by: John Gray <jgray@nyx.com>
Added MAMA_STATUS_SUBSCRIPTION_GAP

Middleware bridges pass this status to the mamaSubscription onError callback
when the middleware detects a gap:

    mamaSubscription_getUserCallbacks(sub)->onError(...)

Middlewares that do not detect dropped messages will not use this status.

Note that this callback is independent of the sequence number gap detection
implemented by dqpublisher and dqstrategy.

Signed-off-by: John Gray <jgray@nyx.com>
Renamed listenerMsgCallback_invokeErrorCallback

Renamed listenerMsgCallbackImpl_invokeErrorCallback to
listenerMsgCallbackImpl_invokeErrorCallback because it is an internal method.
The method is also static and moved to the end of the file

Signed-off-by: John Gray <jgray@nyx.com>
Added listenerMsgCallbackImpl_logUnknowStatus

This method refactors repeated logging statements and make the source easier to
follow.

Signed-off-by: Micheal Schonberg <mschonberg@nyx.com>
Only invoke onQuality callbck for MAMA_MSG_TYPE_MISC

When amessage arrives with a status of POSSIBLY_STALE, verify that the message
type is MAMA_MSG_TYPE_MISC. This behavior is consistent with OpenMAMA market
data publishers.

Signed-off-by: Michael Schonberg <mschonberg@nyx.com>
Initialize Callbacks structs to 0 for mamasymbolist subscriber

This avoids a potentional sgmentation fault in the event that an uninitialized
callback gets invoked.

Signed-off-by: John Gray <jgray@nyx.com>
Use Transport Properties for FT Configuration

Currently, the FT setup code uses the hard-coded transport name, "ft", to read
properties from mama.properties despite the fact that the caller supplies a
mamaTransport reference. This change uses the supplied transport's name to
lookup FT configuration properties.

Signed-off-by: John Gray <jgray@nyx.com>
Added mamaTransportImpl_setAdvisoryCauseAndPlatformInfo()

This method allows bridges to pass middleware specific details regarding errors
and events.

Signed-off-by: John Gray <jgray@nyx.com>
MAMA: Move global bridge data to struct

This is in preparation for adding improved reference counting and locking around
mama_open(), and mama_close() to enable them to be called safely from
multi-threaded applications.

A number of compiler warnings are also fixed.

Signed-off-by: John Gray <jgray@nyx.com>
Added locking around mama_open() and mama_close()

Improved the reference counting logic and added locking around mama_open() and
mama_close(). The change ensures that all initialization (one-time) and cleanup
only occurs once. It also ensures that the reference count never goes belowe
zero.

Signed-off-by: John Gray <jgray@nyx.com>