Merge pull request #257 from zaphoyd/experimental

merge last bit of changes from experimental to master
This commit is contained in:
Peter Thorson
2013-06-09 07:15:12 -07:00
3 changed files with 14 additions and 5 deletions

View File

@@ -111,15 +111,17 @@ private:
typedef typename concurrency::scoped_lock_type scoped_lock_type;
typedef typename concurrency::mutex_type mutex_type;
const char* get_timestamp() {
// The timestamp does not include the time zone, because on Windows with the default registry settings,
// the time zone would be written out in full, which would be obnoxiously verbose.
std::string get_timestamp() {
std::time_t t = std::time(NULL);
std::strftime(buffer,39,"%Y-%m-%d %H:%M:%S%z",std::localtime(&t));
char buffer[40];
std::strftime(buffer,sizeof(buffer),"%Y-%m-%d %H:%M:%S",std::localtime(&t));
return buffer;
}
mutex_type m_lock;
char buffer[40];
const level m_static_channels;
level m_dynamic_channels;
std::ostream* m_out;

View File

@@ -338,8 +338,8 @@ public:
}
std::string val;
val.append(1,0xff);
val.append(1,0x00);
val.append(1,'\xff');
val.append(1,'\x00');
out->set_payload(val);
out->set_prepared(true);

View File

@@ -102,7 +102,14 @@ class SHA1
while(length-- && !Corrupted)
{
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(suppress: 6386) // Suppresses Visual Studio code analysis for write overrun. It doesn't know the index into Message_Block is protected by checking length.
#endif
Message_Block[Message_Block_Index++] = (*message_array & 0xFF);
#ifdef _MSC_VER
#pragma warning(pop)
#endif
Length_Low += 8;
Length_Low &= 0xFFFFFFFF; // Force it to 32 bits