Merge branch 'master' into develop

Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj
	modules/ripple_app/ripple_app.cpp
	modules/ripple_websocket/ripple_websocket.cpp
	src/cpp/ripple/NetworkOPs.cpp
	src/cpp/ripple/ripple_Application.cpp
	src/cpp/ripple/ripple_Peer.cpp
This commit is contained in:
JoelKatz
2013-07-07 15:28:18 -07:00
18 changed files with 135 additions and 44 deletions

View File

@@ -195,6 +195,8 @@ private:
// We do it this way in case we want to add exponential decay later
int now = UptimeTimer::getInstance ().getElapsedSeconds ();
boost::mutex::scoped_lock sl (mLock);
canonicalize (source, now);
source.mBalance += credits;
@@ -204,7 +206,8 @@ private:
if (source.isPrivileged ()) // privileged sources never warn/cutoff
return false;
if ((source.mBalance >= mDebitLimit) && (source.mLastWarning == now)) // no need to warn
if ( (source.mBalance >= mDebitWarn) ||
((source.mBalance >= mDebitLimit) && (source.mLastWarning == now)))
return false;
return true;