1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed pause issue running post-build scripts, added curl diagnostics

This commit is contained in:
Brian Fiete 2019-09-04 07:00:38 -07:00
parent c5dca50e50
commit 43c82515fe
5 changed files with 37 additions and 21 deletions

View file

@ -20,6 +20,6 @@
<LocalDebuggerEnvironment>_NO_DEBUG_HEAP=1</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>

View file

@ -95,14 +95,14 @@ void NetRequest::Perform()
// }
BfLogDbg("NetManager starting get on %s\n", mURL.c_str());
mNetManager->mDebugManager->OutputRawMessage(StrFormat("msgLo Getting '%s'\n", mURL.c_str()));
mOutTempPath = mOutPath + "__partial";
mCURL = curl_easy_init();
if (mShowTracking)
{
//mNetManager->mDebugManager->OutputMessage(StrFormat("Getting '%s'\n", mURL.c_str()));
{
mNetManager->mDebugManager->OutputRawMessage(StrFormat("symsrv Getting '%s'", mURL.c_str()));
}
@ -125,8 +125,9 @@ void NetRequest::Perform()
long response_code = 0;
curl_easy_getinfo(mCURL, CURLINFO_RESPONSE_CODE, &response_code);
mNetManager->mDebugManager->OutputRawMessage(StrFormat("msgLo Result for '%s': %d\n", mURL.c_str(), response_code));
if (response_code != 200)
{
{
mOutFile.Close();
// Bad result
mFailed = true;
@ -139,7 +140,7 @@ void NetRequest::Perform()
mNetManager->Cancel(mCancelOnSuccess);
if (!mOutFile.IsOpen())
{
{
mFailed = true;
return; // No data
}
@ -150,7 +151,9 @@ void NetRequest::Perform()
BfpFile_Rename(mOutTempPath.c_str(), mOutPath.c_str(), &renameResult);
if (renameResult != BfpFileResult_Ok)
{
mFailed = true;
}
}
#else
@ -479,6 +482,8 @@ bool NetManager::Get(const StringImpl& url, const StringImpl& destPath)
delete netRequest;
BfLogDbg("NetManager::Get requested %s: %d\n", url.c_str(), !netResult->mFailed);
mDebugManager->OutputRawMessage(StrFormat("msgLo Result for '%s': %d\n", url.c_str(), !netResult->mFailed));
return (!netResult->mFailed) && (FileExists(netResult->mOutPath));
}