← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3344: signal CCPM in CSUP

 

------------------------------------------------------------
revno: 3344
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2013-08-19 23:40:31 +0200
message:
  signal CCPM in CSUP
modified:
  dcpp/ConnectionManager.cpp
  dcpp/UserConnection.cpp
  dcpp/UserConnection.h
  win32/PrivateFrame.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/ConnectionManager.cpp'
--- dcpp/ConnectionManager.cpp	2013-08-19 20:13:24 +0000
+++ dcpp/ConnectionManager.cpp	2013-08-19 21:40:31 +0000
@@ -50,6 +50,7 @@
 	adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BASE);
 	adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_TIGR);
 	adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BZIP);
+	adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_CCPM);
 }
 
 void ConnectionManager::listen() {

=== modified file 'dcpp/UserConnection.cpp'
--- dcpp/UserConnection.cpp	2013-08-19 20:13:24 +0000
+++ dcpp/UserConnection.cpp	2013-08-19 21:40:31 +0000
@@ -40,6 +40,7 @@
 const string UserConnection::FEATURE_ADC_BASE = "BASE";
 const string UserConnection::FEATURE_ADC_BZIP = "BZIP";
 const string UserConnection::FEATURE_ADC_TIGR = "TIGR";
+const string UserConnection::FEATURE_ADC_CCPM = "CCPM";
 
 const string UserConnection::FILE_NOT_AVAILABLE = "File Not Available";
 

=== modified file 'dcpp/UserConnection.h'
--- dcpp/UserConnection.h	2013-08-19 20:13:24 +0000
+++ dcpp/UserConnection.h	2013-08-19 21:40:31 +0000
@@ -49,6 +49,7 @@
 	static const string FEATURE_ADC_BASE;
 	static const string FEATURE_ADC_BZIP;
 	static const string FEATURE_ADC_TIGR;
+	static const string FEATURE_ADC_CCPM;
 
 	static const string FILE_NOT_AVAILABLE;
 

=== modified file 'win32/PrivateFrame.cpp'
--- win32/PrivateFrame.cpp	2013-08-19 21:01:34 +0000
+++ win32/PrivateFrame.cpp	2013-08-19 21:40:31 +0000
@@ -210,15 +210,17 @@
 }
 
 bool PrivateFrame::preClosing() {
+	{
+		Lock l(mutex);
+		if(conn) {
+			conn->removeListener(this);
+			conn->disconnect(true);
+		}
+	}
+
 	ClientManager::getInstance()->removeListener(this);
 	ConnectionManager::getInstance()->removeListener(this);
 
-	{
-		Lock l(mutex);
-		if(conn) { conn->removeListener(this); }
-	}
-	ConnectionManager::getInstance()->disconnect(replyTo.getUser(), ConnectionQueueItem::TYPE_PM);
-
 	frames.erase(replyTo.getUser());
 	return true;
 }