From 46eced8ada6b497d3d6ac0e5f83ea117c9d58554 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 17 Mar 2011 16:08:39 +0900 Subject: [PATCH] Fixed compile error and unit test error without SSL library. --- src/MultiUrlRequestInfo.cc | 2 +- test/RpcMethodTest.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MultiUrlRequestInfo.cc b/src/MultiUrlRequestInfo.cc index 58aac5ed..d2f34fe1 100644 --- a/src/MultiUrlRequestInfo.cc +++ b/src/MultiUrlRequestInfo.cc @@ -58,8 +58,8 @@ #include "SessionSerializer.h" #include "TimeA2.h" #include "fmt.h" +#include "SocketCore.h" #ifdef ENABLE_SSL -# include "SocketCore.h" # include "TLSContext.h" #endif // ENABLE_SSL diff --git a/test/RpcMethodTest.cc b/test/RpcMethodTest.cc index 17de5d30..72d03d1d 100644 --- a/test/RpcMethodTest.cc +++ b/test/RpcMethodTest.cc @@ -347,7 +347,7 @@ void RpcMethodTest::testAddTorrent_withPosition() void RpcMethodTest::testAddMetalink() { File(e_->getOption()->get(PREF_DIR)+ - "/c908634fbc257fd56f0114912c2772aeeb4064f4.met4").remove(); + "/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").remove(); AddMetalinkRpcMethod m; RpcRequest req(AddMetalinkRpcMethod::getMethodName(), List::g()); req.params->append(readFile(A2_TEST_DIR"/2files.metalink")); @@ -358,9 +358,11 @@ void RpcMethodTest::testAddMetalink() CPPUNIT_ASSERT_EQUAL((size_t)2, resParams->size()); CPPUNIT_ASSERT_EQUAL(std::string("1"), asString(resParams->get(0))->s()); CPPUNIT_ASSERT_EQUAL(std::string("2"), asString(resParams->get(1))->s()); +#ifdef ENABLE_MESSAGE_DIGEST CPPUNIT_ASSERT (File(e_->getOption()->get(PREF_DIR)+ "/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists()); +#endif // ENABLE_MESSAGE_DIGEST SharedHandle tar = e_->getRequestGroupMan()->findReservedGroup(1); @@ -386,8 +388,10 @@ void RpcMethodTest::testAddMetalink() CPPUNIT_ASSERT_EQUAL(dir+"/aria2-5.0.0.tar.bz2", e_->getRequestGroupMan()->findReservedGroup(3)-> getFirstFilePath()); +#ifdef ENABLE_MESSAGE_DIGEST CPPUNIT_ASSERT (File(dir+"/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists()); +#endif // ENABLE_MESSAGE_DIGEST } }