diff options
| -rw-r--r-- | src/client.cpp | 1 | ||||
| -rw-r--r-- | src/logger.cpp | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index 8077b3d..9f0eb21 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
| @@ -71,6 +71,7 @@ void Bu::Client::processOutput() | |||
| 71 | void Bu::Client::setProtocol( Protocol *pProto ) | 71 | void Bu::Client::setProtocol( Protocol *pProto ) |
| 72 | { | 72 | { |
| 73 | this->pProto = pProto; | 73 | this->pProto = pProto; |
| 74 | this->pProto->onNewConnection( this ); | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | Bu::Protocol *Bu::Client::getProtocol() | 77 | Bu::Protocol *Bu::Client::getProtocol() |
diff --git a/src/logger.cpp b/src/logger.cpp index 1e0313b..aedfe0f 100644 --- a/src/logger.cpp +++ b/src/logger.cpp | |||
| @@ -133,12 +133,11 @@ void Bu::Logger::hexDump( int nLevel, const char *sFile, const char *sFunction, | |||
| 133 | int nLine, const void *pDataV, long nDataLen, | 133 | int nLine, const void *pDataV, long nDataLen, |
| 134 | const char *lpName ) | 134 | const char *lpName ) |
| 135 | { | 135 | { |
| 136 | log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.\n", nDataLen, lpName ); | 136 | log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.", nDataLen, lpName ); |
| 137 | const unsigned char *pData = (const unsigned char *)pDataV; | 137 | const unsigned char *pData = (const unsigned char *)pDataV; |
| 138 | int j = 0; | 138 | int j = 0; |
| 139 | Bu::FString sBorder; | 139 | Bu::FString sBorder; |
| 140 | for( int l = 0; l < 8*3+2*8+2; l++ ) sBorder += ((l!=8*3)?("-"):("+")); | 140 | for( int l = 0; l < 8*3+2*8+2; l++ ) sBorder += ((l!=8*3)?("-"):("+")); |
| 141 | sBorder += '\n'; | ||
| 142 | log( nLevel, sFile, sFunction, nLine, sBorder.getStr() ); | 141 | log( nLevel, sFile, sFunction, nLine, sBorder.getStr() ); |
| 143 | Bu::FString sLine; | 142 | Bu::FString sLine; |
| 144 | for(;;) | 143 | for(;;) |
| @@ -165,7 +164,6 @@ void Bu::Logger::hexDump( int nLevel, const char *sFile, const char *sFunction, | |||
| 165 | sprintf( buf, "%c ", (pData[j+k]>32 && pData[j+k]<=128)?(pData[j+k]):('.') ); | 164 | sprintf( buf, "%c ", (pData[j+k]>32 && pData[j+k]<=128)?(pData[j+k]):('.') ); |
| 166 | sLine += buf; | 165 | sLine += buf; |
| 167 | } | 166 | } |
| 168 | sLine += '\n'; | ||
| 169 | log( nLevel, sFile, sFunction, nLine, sLine.getStr() ); | 167 | log( nLevel, sFile, sFunction, nLine, sLine.getStr() ); |
| 170 | sLine = ""; | 168 | sLine = ""; |
| 171 | j += kmax; | 169 | j += kmax; |
