diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-16 10:01:02 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-16 10:01:02 +0200 |
commit | a336dc690f8e39ba10806b118c99e06f4b5dc862 (patch) | |
tree | 8edd6525618d5a1ac7342b65f356daf8bfe44122 /runtime/stream.c | |
parent | afe14ce2f6a514d9e2bf43501f1a02008d9ddea6 (diff) | |
download | rsyslog-a336dc690f8e39ba10806b118c99e06f4b5dc862.tar.gz rsyslog-a336dc690f8e39ba10806b118c99e06f4b5dc862.tar.bz2 rsyslog-a336dc690f8e39ba10806b118c99e06f4b5dc862.zip |
cleanup
Diffstat (limited to 'runtime/stream.c')
-rw-r--r-- | runtime/stream.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/stream.c b/runtime/stream.c index 5b1e105c..3f42953e 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -581,7 +581,7 @@ strmReadBuf(strm_t *pThis, int *padBytes) toRead = pThis->sIOBufSize; } else { CHKiRet(pThis->cryprov->GetBytesLeftInBlock(pThis->cryprovFileData, &bytesLeft)); - if(bytesLeft == -1 || bytesLeft > pThis->sIOBufSize) { + if(bytesLeft == -1 || bytesLeft > (ssize_t) pThis->sIOBufSize) { toRead = pThis->sIOBufSize; } else { toRead = (size_t) bytesLeft; @@ -601,7 +601,8 @@ strmReadBuf(strm_t *pThis, int *padBytes) pThis->cryprov->Decrypt(pThis->cryprovFileData, pThis->pIOBuf, &actualDataLen); *padBytes = iLenRead - actualDataLen; iLenRead = actualDataLen; -dbgprintf("DDDD: data read (padBytes %d), decrypted: %1024.1024s\n", *padBytes, pThis->pIOBuf); + DBGOPRINT((obj_t*) pThis, "encrypted file %d pad bytes %d, actual " + "data %ld\n", pThis->fd, *padBytes, iLenRead); } pThis->iBufPtrMax = iLenRead; bRun = 0; /* exit loop */ @@ -1521,12 +1522,11 @@ static rsRetVal strmSeekCurrOffs(strm_t *pThis) /* As the cryprov may use CBC or similiar things, we need to read skip data */ targetOffs = pThis->iCurrOffs; pThis->iCurrOffs = 0; -dbgprintf("DDDD: skip read offs %lld, data: ", (long long) targetOffs); + DBGOPRINT((obj_t*) pThis, "encrypted, doing skip read of %lld bytes\n", + (long long) targetOffs); while(targetOffs != pThis->iCurrOffs) { CHKiRet(strmReadChar(pThis, &c)); -dbgprintf("%c", c); } -dbgprintf("\n"); finalize_it: RETiRet; } |