mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-08 19:04:06 +01:00
commit
d01ec3f8c5
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,6 +13,8 @@
|
||||
*.la
|
||||
*.a
|
||||
*.d
|
||||
*.vsp
|
||||
*.psess
|
||||
|
||||
# Make #
|
||||
########
|
||||
|
@ -148,6 +148,9 @@ protected:
|
||||
//
|
||||
|
||||
|
||||
GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings
|
||||
|
||||
|
||||
template <bool x>
|
||||
struct POCO_STATIC_ASSERTION_FAILURE;
|
||||
|
||||
|
@ -46,11 +46,14 @@ void LogStreamBuf::setPriority(Message::Priority priority)
|
||||
int LogStreamBuf::writeToDevice(char c)
|
||||
{
|
||||
if (c == '\n' || c == '\r')
|
||||
{
|
||||
if (_message.find_first_not_of("\r\n") != std::string::npos)
|
||||
{
|
||||
Message msg(_logger.name(), _message, _priority);
|
||||
_message.clear();
|
||||
_logger.log(msg);
|
||||
}
|
||||
}
|
||||
else _message += c;
|
||||
return c;
|
||||
}
|
||||
|
@ -55,14 +55,16 @@ std::string PathImpl::systemImpl()
|
||||
std::string PathImpl::homeImpl()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
// windows service has no home dir, return system directory instead
|
||||
try
|
||||
if (EnvironmentImpl::hasImpl("USERPROFILE"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("USERPROFILE");
|
||||
}
|
||||
else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("HOMEDRIVE");
|
||||
result.append(EnvironmentImpl::getImpl("HOMEPATH"));
|
||||
}
|
||||
catch (NotFoundException&)
|
||||
else
|
||||
{
|
||||
result = systemImpl();
|
||||
}
|
||||
|
@ -65,14 +65,16 @@ std::string PathImpl::systemImpl()
|
||||
std::string PathImpl::homeImpl()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
// windows service has no home dir, return system directory instead
|
||||
try
|
||||
if (EnvironmentImpl::hasImpl("USERPROFILE"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("USERPROFILE");
|
||||
}
|
||||
else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH"))
|
||||
{
|
||||
result = EnvironmentImpl::getImpl("HOMEDRIVE");
|
||||
result.append(EnvironmentImpl::getImpl("HOMEPATH"));
|
||||
}
|
||||
catch (NotFoundException&)
|
||||
else
|
||||
{
|
||||
result = systemImpl();
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ private:
|
||||
enum Limits
|
||||
{
|
||||
MAX_METHOD_LENGTH = 32,
|
||||
MAX_URI_LENGTH = 4096,
|
||||
MAX_URI_LENGTH = 16384,
|
||||
MAX_VERSION_LENGTH = 8
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user