SCONS: Resolve issues with scan-build tool.

Summary:
There are a couple of issues with the current scan-build tool
within our scons framework, where it doesn't pass the full set of
environment variables to the underlying compiler (in this case
ccc-analyze and cxx-analyze).

In order to resolve, the tool now sets the SCons env['ENV']
variables, which forces them to be passed to the environment
under which the analyzers run.

Also added some additional logic which ensures that the
clang-analyzer cannot be invoked except when run within scan-build,
and to fix issues with compiler specification when running the clean
command (clean should proceed regardless of the compiler specified).

Signed-off-by: Damian Maguire <damian@sciantechnologies.com>

Test Plan: Checking building OpenMAMA with scan-build and scons.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D27
QPID: Logging bug

Fix for some error logging which is being truncated

Signed-off-by: Phil Preston <philippreston@mac.com>
MAMA: Fixing issues with msgutils.c

Summary:
Fixing a number of warnings generated by msgutils code.
- Fixes issues with uninitialised variables:

- Also fixes compiler warning generated by clang, re: implicit
  conversion from mama_status to mamaMsgStatus

  mama/c_cpp/src/c/msgutils.c:44:74: warning: implicit conversion from
     enumeration type 'mama_status' to different enumeration type
     'mamaMsgStatus' (aka 'enum mamaMsgStatus_')
     [-Wenum-conversion]
          "Trying wIndexSymbol.", mamaMsgStatus_stringForStatus (status));
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^~~~~~

Test Plan:
Check the compiler warning has been fixed, run unit tests and example
apps.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D30
MAMDA: LLVM 5.1 Fixes - pointer dereference

Summary:
XCode 5.1 update includes LLVM 5.1 (CLang 3.4) which now fires a number of build
errors.

Number of files dealing with partid on multi participant feeds do not dereference
the pointer to the last dot char, before comparing to the null terminating
character.  Compiler throws an error comparison of pointer against int.

Signed-off-by: Phil Preston <philippreston@mac.com>

Test Plan: Check sample apps and unit tests.

Reviewers: frank

Reviewed By: frank

Subscribers: glenn

Differential Revision: http://review.openmama.org/D25
MAMDA: LLVM 5.1 Fixes - redeclared structs

Summary:
XCode 5.1 update includes LLVM/CLang 5.1 (CLang 3.4) which now fires a number of
build errors.

struct FieldUpdateTradeId
struct FieldUpdateOrigTradeId

each are declared twice in MamdaTradeListener class

Signed-off-by: Phil Preston <philippreston@mac.com>

Test Plan: Check unit tests, and example applications.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D26
UNITTESTS: Adding getFieldAsString buffer size tests

Summary:
We've previously seen issues with getting vector messages as strings
when the buffer size is too small for the vector. These unit tests
exercise the ability of payloads to handle both cases where the buffer
is large enough, and when the buffer is too small to contain the
message.

Signed-off by: Damian Maguire <dmaguire@nyx.com>

Test Plan: Run unit tests.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D23
QPIDMSG: Fixed getNumFields to work where sub messages present

Summary:
Previously, sub messages were considered when calculating the correct
number of fields. This patch ignores the sub messages and instead
counts only the number of top level fields to conform with other
payload bridges.

Signed-off-by: Frank Quinn <fquinn@nyx.com>

Test Plan:
Check unit tests, example apps, ensure code works with message
including submessages.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D32
Update Makefile.samples to add ICC support [OMAMA-255]

Signed-off-by: A Ambrose <aambrose@nyx.com>
Modification to the log level of several messages within mamaMsg_isFromInbox() [OMAMA-256]

Signed-off-by: A Ambrose <aambrose@nyx.com>
UNITTEST: Add roundtrip serialization payload test

Summary:
- The roundtrip serialization unit test constructs a reasonably
  representative payload with most of the payload types - It then
  serialises and unserialises this into a second payload and then
  extracts the field data for comparison against the egress payload.

Signed-off-by: Lee Skillen <lskillen@vulcanft.com>

Test Plan: Check build, and run unit tests.

Reviewers: frank

Reviewed By: frank

Differential Revision: http://review.openmama.org/D28
UNITTEST: Increase the range of the equalAndCompareTest

The EqualAndCompareTest in the date time range tests compares the
hardcoded dates with today's date plus and minus a year. Unfortunately,
the actual date recently drifted outside that range, forcing the tests
to fail. This patch simply extends the range to avoid triggering the
problem.
Api Code hygiene improvements - Common property.c/wMessageStats.c

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

Test Plan: Check unit tests, ensure coverage of this code.

Reviewers: matt

Reviewed By: matt

Differential Revision: http://review.openmama.org/D33
MAMDA: Updates to SecurityStatus & SecurityStatusQual for C++/C#/Java

Series of updates to SecurityStatus and SecurityStatusQual enum types, in order
to align better with MDM, and to handle recent exchange changes. [OMAMA-254]

Signed-off-by: A Ambrose <aambrose@nyx.com>
MAMADA: Update to correct state machine to allow reactivation from state deactivated. [OMAMA-259]

Description - Refactor of Mamda Subscription methods, to now allow activation
call from state deactivating/deactivated.

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

Test Plan:
Test attempting to reactive a deactivated subscription by putting
an activate call in the onError callback. A timeout event will cause an error
in the activate. Putting deactivate / activate call in the onMsg
will give also cause an error. Once the patch has been applied, both should
complete successfully.

Reviewers: matt

Reviewed By: matt

Differential Revision: http://review.openmama.org/D35
OpenSource MamaFieldCache for C and CPP

Signed-off-by: Gary Molloy <gmolloy@nyx.com>
FIELDCACHE: Additional header cleanup.

Cleaning up the field cache code headers to remove unnecessary
repository details.
MAMA: Update to mamaDispatcher_create to generate unique queue name

Summary: At present mamaDispatcher creates multiple queues with the same
name. (NO_NAME). This can lead to issues, particularly around named
threads and cleanup. This patch fixes that issue, as well as improving
the cleanup of threads after shutdown. [OMAMA-257]

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

Test Plan:
Ensure unit tests run fine, check mamalistenc with -threads, check
Valgrind with sample app.

Reviewers: matt

Reviewed By: matt

Differential Revision: http://review.openmama.org/D34
MAMAJNI: Resolve VS issues with spaces in ANT_HOME path

The Visual Studio project file for MAMAJNI had an issue where it
couldn't find ant if the ANT_HOME variable had spaces in the path. This
patch resolves the issue by surrounding the path in &quot;

Signed-off by: Damian Maguire <dmaguire@nyx.com>
MAMA/MAMDA: Update version numbers

Updating the version numbers for OpenMAMA 2.3.1
COMMON: Add wthread_destroy to darwin port.h

Darwin requires the addition of the wthread_destroy define. While
pthread doesn't have a destroy, it is required for the Windows
equivalent.

Signed-off by: Damian Maguire <dmaguire@nyx.com>