From 4537405b95e583f0ab292cabb8f59a08473f91fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Valat=20S=C3=A9bastien?= <sebastien.valat.dev@orange.fr>
Date: Sat, 10 Dec 2011 23:04:51 +0100
Subject: [PATCH] Fix for bug #12618 : avoid to sleep for 3 seconds in ctest
 if CDashDropSite is empty.

---
 Source/cmCTest.cxx |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 14055a4..3f7fdc7 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -440,8 +440,12 @@ std::string cmCTest::GetCDashVersion()
   std::string cdashUri = this->GetCTestConfiguration("DropLocation");
   cdashUri = cdashUri.substr(0, cdashUri.find("/submit.php"));
 
-  url += cdashUri + "/api/getversion.php";
-  int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3);
+  int res = 1;
+  if ( ! cdashUri.empty() )
+  {
+    url += cdashUri + "/api/getversion.php";
+    res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3);
+  }
 
   return res ? this->GetCTestConfiguration("CDashVersion") : response;
 #else
-- 
1.7.8

