[asterisk-scf-commits] asterisk-scf/release/logger.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Apr 15 13:39:00 CDT 2011
branch "master" has been updated
via f72807265551350b1046235d1ef1bac5a4129d0f (commit)
from f4de0d7e6036e93e56e282277c73ace693245218 (commit)
Summary of changes:
server/src/ChainedLogOut.cpp | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit f72807265551350b1046235d1ef1bac5a4129d0f
Author: David M. Lee <dlee at digium.com>
Date: Fri Apr 15 13:38:56 2011 -0500
Fixed signed/unsigned mixing warning.
diff --git a/server/src/ChainedLogOut.cpp b/server/src/ChainedLogOut.cpp
index 66a6e71..65c2166 100644
--- a/server/src/ChainedLogOut.cpp
+++ b/server/src/ChainedLogOut.cpp
@@ -56,12 +56,16 @@ std::ostream& ChainedLogOut::logs(std::ostream& out, const std::string& name,
Level logLevel, const std::string& message)
{
// date level name(1) message
- std::string::size_type lastDot = name.rfind('.');
- if (lastDot == std::string::npos)
+ std::string::size_type nameStart = name.rfind('.');
+ if (nameStart == std::string::npos)
{
- lastDot = -1;
+ nameStart = 0;
}
- std::string lastname = name.substr(lastDot + 1);
+ else
+ {
+ ++nameStart;
+ }
+ std::string lastname = name.substr(nameStart);
{
std::ostream::fmtflags flags = out.flags();
out << getCurrentTime() << ' ' << std::setw(9) << logLevel << ' '
-----------------------------------------------------------------------
--
asterisk-scf/release/logger.git
More information about the asterisk-scf-commits
mailing list