summaryrefslogtreecommitdiff
path: root/src/TorrentMan.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-04-17 14:15:36 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-04-17 14:15:36 +0000
commitdcc225a145aa784c85472e9618cd5fdf96a271b6 (patch)
tree54459ad6e48e03a59e0ffc701b4fefdd144bff32 /src/TorrentMan.cc
parent28a82bfa4ad7a3b905f00d023f7be7096a2f75d4 (diff)
* src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
parameter to a tracker request. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount(). * src/main.cc (setSignalHander): New function. (main): Added a handler for SIGTERM. (handler): Updated message. (torrentHandler): Updated message.
Diffstat (limited to 'src/TorrentMan.cc')
-rw-r--r--src/TorrentMan.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/TorrentMan.cc b/src/TorrentMan.cc
index f076feb6..9c8f06a0 100644
--- a/src/TorrentMan.cc
+++ b/src/TorrentMan.cc
@@ -427,9 +427,11 @@ FileEntries TorrentMan::readFileEntryFromMetaInfoFile(const string& metaInfoFile
Dictionary* topDic = (Dictionary*)MetaFileUtil::parseMetaFile(metaInfoFile);
const Dictionary* infoDic = (const Dictionary*)topDic->get("info");
FileEntries fileEntries;
- Directory* topDir;
+ Directory* topDir = NULL;
readFileEntry(fileEntries, &topDir, infoDic, metaInfoFile);
- delete topDir;
+ if(topDir != NULL) {
+ delete topDir;
+ }
return fileEntries;
}