From 29f98e1f3360c812f4d0df7147fc759bcc0cab8b Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Tue, 19 Dec 2017 22:47:04 +0100 Subject: [PATCH] HaikuDepot : More Backend Communications Improvements Fixes for x86_64 build. --- src/apps/haikudepot/List.h | 1 + src/apps/haikudepot/model/PackageInfo.cpp | 2 +- src/apps/haikudepot/server/AbstractServerProcess.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/haikudepot/List.h b/src/apps/haikudepot/List.h index f6abc1dab6..42f6c2f404 100644 --- a/src/apps/haikudepot/List.h +++ b/src/apps/haikudepot/List.h @@ -7,6 +7,7 @@ #include +#include #include #include diff --git a/src/apps/haikudepot/model/PackageInfo.cpp b/src/apps/haikudepot/model/PackageInfo.cpp index 6607a35629..e783f8bfda 100644 --- a/src/apps/haikudepot/model/PackageInfo.cpp +++ b/src/apps/haikudepot/model/PackageInfo.cpp @@ -1067,7 +1067,7 @@ DepotInfo::AddPackage(const PackageInfoRef& package) static int32 PackageFixedNameCompare(const void* context, const PackageInfoRef& package) { - const BString* packageName = static_cast(context); + const BString* packageName = static_cast(context); return packageName->Compare(package->Name()); } diff --git a/src/apps/haikudepot/server/AbstractServerProcess.cpp b/src/apps/haikudepot/server/AbstractServerProcess.cpp index 5b8b77f80d..c78614f035 100644 --- a/src/apps/haikudepot/server/AbstractServerProcess.cpp +++ b/src/apps/haikudepot/server/AbstractServerProcess.cpp @@ -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); }