Commit Graph

12 Commits

Author SHA1 Message Date
JoelKatz
a2a52ad88b Fix a crash bug reported by Jon Montroll.
ConnectionPool::peerConnect called Peer::connect while holding the
ConnectionPool::mPeerLock. But Peer::connect could call Peer::detach which
calls ConnectionPool::peerClosed which tries to acquire the
ConnectionPool::mPeerLock mutex. Said mutex was not recursive. Belt and
suspenders fix -- make the mutex recursive and make
ConnectionPool::peerConnection call Peer::connect without holding the
ConnectionPool::mPeerLock mutex. (This was intended to be a fast, internal
mutex and calls to external 'heavy' functions should not be made while
holding it.)
2013-02-21 02:43:20 -08:00
JoelKatz
33b2a20024 Correctly track direction and privilege of peer connections, pass to load tracking. 2013-01-14 23:30:13 -08:00
Arthur Britto
3b66a13646 Standalone fixes. 2013-01-12 10:56:29 -08:00
JoelKatz
cf726c7749 Don't connect to invalid IP:port combinations. 2013-01-12 03:37:45 -08:00
JoelKatz
ef9a0f3ed3 Can't call 'size' without the lock. 2013-01-11 11:28:24 -08:00
JoelKatz
cfcb1a2c11 Get rid of the redundant SSL contexts. 2013-01-10 09:10:40 -08:00
Arthur Britto
8877501e5b Remove db->escape in favor of sqlEscape. 2013-01-06 02:08:54 -08:00
JoelKatz
8a1033caad Second round of removing extraneous copy constructor and destructor calls. 2012-12-17 20:31:26 -08:00
JoelKatz
2a06686b7c Round one of fixes to avoid ridiculous numbers of spurious copy constructor and destructor calls.
Most of these fixes involve calls to BOOST_FOREACH to iterate over a map or unordered_map where the
iterator type didn't perfectly match the internal type, so a reference into the map couldn't be created
and a new value/content pair had to be created for each iteration.
2012-12-17 20:20:24 -08:00
Arthur Britto
17b2506cd7 Work toward RPC refactor and do not print to cout. 2012-12-01 17:59:35 -08:00
Arthur Britto
ad4725ae74 Add private peers. 2012-11-20 14:48:53 -08:00
Stefan Thomas
fa3fab5816 Moved cpp code to src/cpp and js code to src/js. 2012-11-07 12:49:50 -08:00