diff options
author | Matthew Newhook <matthew@zeroc.com> | 2007-09-04 17:27:59 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2007-09-04 17:27:59 +0800 |
commit | 612f04376ea27756c44a058f9512aaf2a3c095b9 (patch) | |
tree | 403163cec5182251a080f9a795d4c73d4f2f1e9d /cpp/src/Freeze/ConnectionI.h | |
parent | fix bug with test/Slice/keyword/run.py (diff) | |
download | ice-612f04376ea27756c44a058f9512aaf2a3c095b9.tar.bz2 ice-612f04376ea27756c44a058f9512aaf2a3c095b9.tar.xz ice-612f04376ea27756c44a058f9512aaf2a3c095b9.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2451
Squashed commit of the following:
commit f4ba9698ababcd06659be2c941fb1809833764ee
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:25:35 2007 +0800
some cleanup.
commit 58dae2c8e42132d645e8cbfce7ac6856995d3241
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:20:22 2007 +0800
added more dire warning comments.
commit c95d285943268c3623d61ccae8cc4d4654cf8056
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:09:32 2007 +0800
remove debug. added comment.
commit 8eed648a285edcf6b256ca9195021e36e437ac36
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 17:04:12 2007 +0800
Copy the connection to prevent the transaction from accessing itself after its been blown away.
commit 08523da6819abf029f67178a51c09b39e41168ca
Author: Matthew Newhook <matthew@zeroc.com>
Date: Tue Sep 4 16:25:40 2007 +0800
first set of fixes for the reference counting.
Diffstat (limited to 'cpp/src/Freeze/ConnectionI.h')
-rw-r--r-- | cpp/src/Freeze/ConnectionI.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cpp/src/Freeze/ConnectionI.h b/cpp/src/Freeze/ConnectionI.h index a9011da45e8..aa4fb822089 100644 --- a/cpp/src/Freeze/ConnectionI.h +++ b/cpp/src/Freeze/ConnectionI.h @@ -65,28 +65,27 @@ public: private: - Ice::CommunicatorPtr _communicator; + const Ice::CommunicatorPtr _communicator; SharedDbEnvPtr _dbEnv; - std::string _envName; - TransactionI* _transaction; + const std::string _envName; + TransactionIPtr _transaction; std::list<MapHelperI*> _mapList; - Ice::Int _trace; - Ice::Int _txTrace; - bool _deadlockWarning; + const Ice::Int _trace; + const Ice::Int _txTrace; + const bool _deadlockWarning; }; +typedef IceUtil::Handle<ConnectionI> ConnectionIPtr; inline void ConnectionI::clearTransaction() { - TransactionI* tx = _transaction; _transaction = 0; - tx->internalDecRef(); } inline DbTxn* ConnectionI::dbTxn() const { - if(_transaction == 0) + if(!_transaction) { return 0; } |