diff options
Diffstat (limited to 'lib/libtdekrb/src/tdekrbserversocket.cpp')
-rw-r--r-- | lib/libtdekrb/src/tdekrbserversocket.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libtdekrb/src/tdekrbserversocket.cpp b/lib/libtdekrb/src/tdekrbserversocket.cpp index 3606244..86c4212 100644 --- a/lib/libtdekrb/src/tdekrbserversocket.cpp +++ b/lib/libtdekrb/src/tdekrbserversocket.cpp @@ -270,7 +270,7 @@ int TDEKerberosServerSocket::ungetch(int ch) { } TQ_ULONG TDEKerberosServerSocket::bytesAvailable() const { - bool ret; + TQ_ULONG ret; if (kerberosStatus() == KerberosInUse) { ret = m_bufferLength; @@ -284,9 +284,9 @@ TQ_ULONG TDEKerberosServerSocket::bytesAvailable() const { int TDEKerberosServerSocket::processPendingData() { if (kerberosStatus() == KerberosInUse) { - int reclen; - int wrlen; - if (m_bufferLength <= 0) { + while (TQSocket::canReadLine()) { + int reclen; + int wrlen; char* buf = (char*)malloc(m_negotiatedMaxBufferSize); reclen = receiveEncryptedData(buf, m_negotiatedMaxBufferSize); if (reclen < 0) { @@ -671,7 +671,7 @@ int TDEKerberosServerSocket::transmitEncryptedData(const char* readbuf, int cc) } } - return 0; + return cc; } int TDEKerberosServerSocket::receiveEncryptedData(char *buf, unsigned int trunclen, bool shouldblock) { @@ -716,7 +716,7 @@ TDEKerberosServerSocket::KerberosStatus TDEKerberosServerSocket::kerberosStatus( } bool TDEKerberosServerSocket::canReadData() { - return TQSocket::canReadLine(); + return (TQSocket::canReadLine() || (m_bufferLength > 0)); } void TDEKerberosServerSocket::setStatusMessage(TQString message) { |