[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdecore
From: Waldo Bastian <bastian () kde ! org>
Date: 2003-06-16 9:18:33
[Download RAW message or body]
CVS commit by waba:
Dante doesn't support async connect on all platforms
M +4 -3 kextsock.cpp 1.60
M +7 -2 ksocks.cpp 1.26
M +6 -0 ksocks.h 1.14
--- kdelibs/kdecore/kextsock.cpp #1.59:1.60
@@ -1357,5 +1357,5 @@ int KExtendedSocket::connect()
// check if we have to do timeout
- if (doingtimeout)
+ if (doingtimeout && KSocks::self()->hasWorkingAsyncConnect())
{
fd_set rd, wr;
@@ -2187,4 +2187,5 @@ void KExtendedSocket::connectionEvent()
}
+ if (KSocks::self()->hasWorkingAsyncConnect())
setBlockingMode(false);
if (KSocks::self()->connect(sockfd, p->ai_addr, p->ai_addrlen) == -1)
--- kdelibs/kdecore/ksocks.cpp #1.25:1.26
@@ -89,8 +89,9 @@ class KSocksTable {
// The name of this library
QString myname;
+ bool hasWorkingAsyncConnect;
};
-KSocksTable::KSocksTable() : myname("Unknown") {
+KSocksTable::KSocksTable() : myname("Unknown"), hasWorkingAsyncConnect(true) {
}
@@ -162,4 +163,5 @@ class KDanteSocksTable : public KSocksTa
KDanteSocksTable::KDanteSocksTable() : KSocksTable() {
+ hasWorkingAsyncConnect = false;
myname = i18n("Dante SOCKS client");
symbols.insert(S_SOCKSinit, "SOCKSinit");
@@ -450,4 +451,8 @@ void KSocks::enableSocks() {
}
+bool KSocks::hasWorkingAsyncConnect()
+{
+ return (_useSocks && _st) ? _st->hasWorkingAsyncConnect : true;
+}
--- kdelibs/kdecore/ksocks.h #1.13:1.14
@@ -82,4 +82,10 @@ public:
bool hasSocks();
+ /**
+ * Returns whether asynchronous connects work with the
+ * selected SOCKS impementation
+ */
+ bool hasWorkingAsyncConnect();
+
/*
** REIMPLEMENTATIONS OF LIBC SOCKET FUNCTIONS
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic