linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07033
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3312: Group partial file list uploads to avoid a crash
------------------------------------------------------------
revno: 3312
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2013-06-17 22:17:48 +0200
message:
Group partial file list uploads to avoid a crash
modified:
changelog.txt
dcpp/Upload.cpp
dcpp/UploadManager.cpp
win32/TransferView.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 'changelog.txt'
--- changelog.txt 2013-06-03 12:25:54 +0000
+++ changelog.txt 2013-06-17 20:17:48 +0000
@@ -1,3 +1,5 @@
+* [L#1191099] Group partial file list uploads to avoid a crash (poy)
+
-- 0.822 2013-06-03 --
* Improve plugin management
=== modified file 'dcpp/Upload.cpp'
--- dcpp/Upload.cpp 2013-01-18 21:28:38 +0000
+++ dcpp/Upload.cpp 2013-06-17 20:17:48 +0000
@@ -35,7 +35,7 @@
void Upload::getParams(const UserConnection& aSource, ParamMap& params) {
Transfer::getParams(aSource, params);
- params["source"] = (getType() == TYPE_PARTIAL_LIST ? _("Partial file list") : getPath());
+ params["source"] = getPath();
}
} // namespace dcpp
=== modified file 'dcpp/UploadManager.cpp'
--- dcpp/UploadManager.cpp 2013-01-18 21:28:38 +0000
+++ dcpp/UploadManager.cpp 2013-06-17 20:17:48 +0000
@@ -85,6 +85,7 @@
miniSlot = true;
} else if(aType == Transfer::names[Transfer::TYPE_PARTIAL_LIST]) {
+ sourceFile = _("Partial file list");
type = Transfer::TYPE_PARTIAL_LIST;
miniSlot = true;
=== modified file 'win32/TransferView.cpp'
--- win32/TransferView.cpp 2013-05-19 15:26:34 +0000
+++ win32/TransferView.cpp 2013-06-17 20:17:48 +0000
@@ -737,6 +737,7 @@
if(ui.updateMask & UpdateInfo::MASK_PATH) {
// adding a connection we know the transfer of.
+ dcassert(!ui.path.empty()); // transfers are indexed by path; it can't be empty.
transfer = findTransfer(ui.path, ui.download);
if(conn && &conn->parent != transfer) {
removeConn(*conn);
@@ -820,7 +821,6 @@
}
TransferView::TransferInfo* TransferView::findTransfer(const string& path, bool download) {
- if(path.empty()) { return nullptr; }
for(auto& transfer: transferItems) {
if(transfer.download == download && transfer.path == path) {
return &transfer;