diff options
Diffstat (limited to 'lib/libtdekrb/src')
-rw-r--r-- | lib/libtdekrb/src/tdekrbclientsocket.cpp | 12 | ||||
-rw-r--r-- | lib/libtdekrb/src/tdekrbserversocket.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/libtdekrb/src/tdekrbclientsocket.cpp b/lib/libtdekrb/src/tdekrbclientsocket.cpp index c1cade8..02bee4d 100644 --- a/lib/libtdekrb/src/tdekrbclientsocket.cpp +++ b/lib/libtdekrb/src/tdekrbclientsocket.cpp @@ -269,7 +269,7 @@ int TDEKerberosClientSocket::ungetch(int ch) { } TQ_ULONG TDEKerberosClientSocket::bytesAvailable() const { - bool ret; + TQ_ULONG ret; if (kerberosStatus() == KerberosInUse) { ret = m_bufferLength; @@ -283,9 +283,9 @@ TQ_ULONG TDEKerberosClientSocket::bytesAvailable() const { int TDEKerberosClientSocket::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) { @@ -662,7 +662,7 @@ int TDEKerberosClientSocket::transmitEncryptedData(const char* readbuf, int cc) } } - return 0; + return cc; } int TDEKerberosClientSocket::receiveEncryptedData(char *buf, unsigned int trunclen, bool shouldblock) { @@ -707,7 +707,7 @@ TDEKerberosClientSocket::KerberosStatus TDEKerberosClientSocket::kerberosStatus( } bool TDEKerberosClientSocket::canReadData() { - return TQSocket::canReadLine(); + return (TQSocket::canReadLine() || (m_bufferLength > 0)); } void TDEKerberosClientSocket::setStatusMessage(TQString message) { 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) { |