HaikuDepot : More Backend Communications Improvements

Fixes for x86_64 build.
This commit is contained in:
Andrew Lindesay 2017-12-19 22:47:04 +01:00
parent 0df6decf1b
commit 29f98e1f33
3 changed files with 5 additions and 4 deletions

View File

@ -7,6 +7,7 @@
#include <new>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1067,7 +1067,7 @@ DepotInfo::AddPackage(const PackageInfoRef& package)
static int32 PackageFixedNameCompare(const void* context,
const PackageInfoRef& package)
{
const BString* packageName = static_cast<BString*>(context);
const BString* packageName = static_cast<const BString*>(context);
return packageName->Compare(package->Name());
}

View File

@ -411,10 +411,10 @@ AbstractServerProcess::DownloadToLocalFile(const BPath& targetFilePath,
return APP_ERR_NOT_MODIFIED;
} else if (BHttpRequest::IsRedirectionStatusCode(statusCode)) {
if (location.Length() != 0) {
BUrl location(result.Url(), location);
BUrl redirectUrl(result.Url(), location);
fprintf(stdout, "[%s] will redirect to; %s\n",
Name(), location.UrlString().String());
return DownloadToLocalFile(targetFilePath, location,
Name(), redirectUrl.UrlString().String());
return DownloadToLocalFile(targetFilePath, redirectUrl,
redirects + 1, 0);
}