2009-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Added comment
	* src/RequestGroup.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-06-21 10:36:59 +00:00
parent f3c79ebf05
commit a60ba71f1e
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added comment
* src/RequestGroup.cc
2009-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
In CookieStorage::load() and saveNsFormat(), handle exception

View File

@ -820,6 +820,12 @@ void RequestGroup::releaseRuntimeResource(DownloadEngine* e)
SharedHandle<BtRegistry> btRegistry = e->getBtRegistry();
BtContextHandle btContextInReg =
btRegistry->getBtContext(btContext->getInfoHashAsString());
// Make sure that the registered BtContext's GID is equal to
// this->getGID(). Even if createInitialCommand() throws
// exception without registering this BtContext, after that, this
// method is called. In this case, just finding BtContext using
// infoHash may detect another download's BtContext and deleting
// it from BtRegistry causes Segmentation Fault.
if(!btContextInReg.isNull() &&
btContextInReg->getOwnerRequestGroup()->getGID() ==
btContext->getOwnerRequestGroup()->getGID()) {