[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/stable/extragear-kde4/network/ktorrent/libbtcore/net
From:       Joris Guisson <joris.guisson () gmail ! com>
Date:       2009-02-26 18:14:04
Message-ID: 1235672044.769523.5959.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 932471 by guisson:

Some more fixes for windows :
- Don't set TOS if it is 0
- Disable WakeUpPipe stuff completely, instead using a timeout

 M  +6 -1      downloadthread.cpp  
 M  +4 -0      socket.cpp  


--- branches/stable/extragear-kde4/network/ktorrent/libbtcore/net/downloadthread.cpp \
#932470:932471 @@ -54,11 +54,13 @@
 		{
 			bool group_limits = false;
 			sm->lock();
+#ifndef Q_WS_WIN
 			if (fd_vec[0].revents & POLLIN)
 			{
 				// wake up was triggered
 				wake_up.handleData();
 			}
+#endif
 			
 			TimeStamp now = bt::Now();
 			Uint32 num_ready = 0;
@@ -124,9 +126,10 @@
 	
 	int DownloadThread::waitForSocketReady(int timeout)
 	{
-		int i = 1;
+		int i = 0;
 		sm->lock();
 		
+#ifndef Q_WS_WIN
 		// Add the wake up pipe
 		if (fd_vec.size() >= 1)
 		{
@@ -143,6 +146,8 @@
 			wfd.events = POLLIN;
 			fd_vec.push_back(wfd);
 		}
+		i++;
+#endif
 		
 		// fill the poll vector with all sockets
 		SocketMonitor::Itr itr = sm->begin();
--- branches/stable/extragear-kde4/network/ktorrent/libbtcore/net/socket.cpp \
#932470:932471 @@ -305,6 +305,10 @@
 	
 	bool Socket::setTOS(unsigned char type_of_service)
 	{
+		// If type of service is 0, do nothing
+		if (type_of_service == 0)
+			return true;
+
 		if (m_ip_version == 4)
 		{
 #if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && \
__FreeBSD_version < 600020) || defined(Q_OS_NETBSD) || defined(Q_OS_BSD4)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic