Author: gordonsim
Date: 2009-05-21 08:43:28 -0400 (Thu, 21 May 2009)
New Revision: 3390
Modified:
store/trunk/cpp/lib/MessageStoreImpl.cpp
Log:
Handle case where recovery of exchange does not succeed (e.g. if it is defined by an
unloaded plugin)
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-05-20 15:32:19 UTC (rev 3389)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-05-21 12:43:28 UTC (rev 3390)
@@ -814,9 +814,11 @@
Buffer buffer(reinterpret_cast<char*>(value.get_data()),
value.get_size());
//create a Exchange instance
RecoverableExchange::shared_ptr exchange = registry.recoverExchange(buffer);
- //set the persistenceId and update max as required
- exchange->setPersistenceId(key.id);
- index[key.id] = exchange;
+ if (exchange) {
+ //set the persistenceId and update max as required
+ exchange->setPersistenceId(key.id);
+ index[key.id] = exchange;
+ }
maxExchangeId = max(key.id, maxExchangeId);
}
exchangeIdSequence.reset(maxExchangeId + 1);
Show replies by date