mirror of https://github.com/aria2/aria2
2010-06-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added log message when cookies are loaded. Added filename to log message when serializing session. * src/MultiUrlRequestInfo.ccpull/1/head
parent
bf5e76a9a2
commit
5d80399624
|
@ -1,3 +1,9 @@
|
||||||
|
2010-06-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Added log message when cookies are loaded. Added filename to log
|
||||||
|
message when serializing session.
|
||||||
|
* src/MultiUrlRequestInfo.cc
|
||||||
|
|
||||||
2010-06-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-06-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Treat SIGHUP and SIGTERM signal as emergency shutdown because they
|
Treat SIGHUP and SIGTERM signal as emergency shutdown because they
|
||||||
|
|
|
@ -126,10 +126,11 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute()
|
||||||
if(!_option->blank(PREF_LOAD_COOKIES)) {
|
if(!_option->blank(PREF_LOAD_COOKIES)) {
|
||||||
File cookieFile(_option->get(PREF_LOAD_COOKIES));
|
File cookieFile(_option->get(PREF_LOAD_COOKIES));
|
||||||
if(cookieFile.isFile()) {
|
if(cookieFile.isFile()) {
|
||||||
e->getCookieStorage()->load(_option->get(PREF_LOAD_COOKIES));
|
e->getCookieStorage()->load(cookieFile.getPath());
|
||||||
|
_logger->info("Loaded cookies from '%s'.",
|
||||||
|
cookieFile.getPath().c_str());
|
||||||
} else {
|
} else {
|
||||||
_logger->error(MSG_LOADING_COOKIE_FAILED,
|
_logger->error(MSG_LOADING_COOKIE_FAILED, cookieFile.getPath().c_str());
|
||||||
_option->get(PREF_LOAD_COOKIES).c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,10 +213,13 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute()
|
||||||
SessionSerializer sessionSerializer(e->_requestGroupMan);
|
SessionSerializer sessionSerializer(e->_requestGroupMan);
|
||||||
// TODO Add option: --save-session-status=error,inprogress,waiting
|
// TODO Add option: --save-session-status=error,inprogress,waiting
|
||||||
if(!_option->blank(PREF_SAVE_SESSION)) {
|
if(!_option->blank(PREF_SAVE_SESSION)) {
|
||||||
if(sessionSerializer.save(_option->get(PREF_SAVE_SESSION))) {
|
const std::string& filename = _option->get(PREF_SAVE_SESSION);
|
||||||
_logger->notice("Serialized session successfully.");
|
if(sessionSerializer.save(filename)) {
|
||||||
|
_logger->notice("Serialized session to '%s' successfully.",
|
||||||
|
filename.c_str());
|
||||||
} else {
|
} else {
|
||||||
_logger->notice("Failed to serialize session.");
|
_logger->notice("Failed to serialize session to '%s'.",
|
||||||
|
filename.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(RecoverableException& e) {
|
} catch(RecoverableException& e) {
|
||||||
|
|
Loading…
Reference in New Issue