Merge branch 'develop' into elb

This commit is contained in:
JoelKatz
2013-05-29 15:04:03 -07:00
3 changed files with 7 additions and 4 deletions

View File

@@ -54,7 +54,10 @@ public:
}
};
#define SETUP_LOG(k) template <> inline char const* LogPartition::getFileName <k> () { return __FILE__; }
#define SETUP_LOG(k) \
template <> inline char const* LogPartition::getFileName <k> () { return __FILE__; } \
struct k##Instantiator { k##Instantiator () { LogPartition::get <k> (); } }; \
static k##Instantiator k##Instantiator_instance;
//------------------------------------------------------------------------------

View File

@@ -11,8 +11,6 @@ std::string strprintf(const char* format, ...);
std::string FormatFullVersion();
void RandAddSeedPerfmon();
static const unsigned int MAX_SIZE = 0x02000000;
#define loop for (;;)
#define PAIR(t1, t2) pair<t1, t2>

View File

@@ -23,6 +23,8 @@ SETUP_LOG (RPC)
using namespace boost;
using namespace boost::asio;
unsigned int const gMaxHTTPHeaderSize = 0x02000000;
Json::Value JSONRPCError(int code, const std::string& message)
{
Json::Value error(Json::objectValue);
@@ -173,7 +175,7 @@ int ReadHTTP(std::basic_istream<char>& stream, std::map<std::string, std::string
// Read header
int nLen = ReadHTTPHeader(stream, mapHeadersRet);
if (nLen < 0 || nLen > MAX_SIZE)
if (nLen < 0 || nLen > gMaxHTTPHeaderSize)
return 500;
// Read message