← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3350: send CINF earlier

 

------------------------------------------------------------
revno: 3350
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2013-09-16 20:23:35 +0200
message:
  send CINF earlier
modified:
  dcpp/ConnectionManager.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-09-15 17:48:08 +0000
+++ dcpp/ConnectionManager.cpp	2013-09-16 18:23:35 +0000
@@ -715,6 +715,13 @@
 			return;
 		}
 		type = tokCheck.second;
+
+		// set the PM flag now in order to send a INF with PM1
+		if((type == CONNECTION_TYPE_PM || cmd.hasFlag("PM", 0)) && !aSource->isSet(UserConnection::FLAG_PM)) {
+			aSource->setFlag(UserConnection::FLAG_PM);
+		}
+
+		aSource->inf(false);
 	}
 
 	if(type == CONNECTION_TYPE_DOWNLOAD || checkDownload(aSource)) {
@@ -729,10 +736,6 @@
 		if(!aSource->isSet(UserConnection::FLAG_UPLOAD)) { aSource->setFlag(UserConnection::FLAG_UPLOAD); }
 		addNewConnection(aSource, CONNECTION_TYPE_UPLOAD);
 	}
-
-	if(aSource->isSet(UserConnection::FLAG_INCOMING)) {
-		aSource->inf(false);
-	}
 }
 
 void ConnectionManager::force(const UserPtr& aUser) {