HaikuDepot: code clean-up from #12793
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
|||||||
|
|
||||||
virtual bool AcceptsPackage(const PackageInfoRef& package) const
|
virtual bool AcceptsPackage(const PackageInfoRef& package) const
|
||||||
{
|
{
|
||||||
if (package.Get()==NULL)
|
if (package.Get() == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
printf("TEST %s\n", package->Name().String());
|
printf("TEST %s\n", package->Name().String());
|
||||||
@@ -846,14 +846,14 @@ Model::PopulateWebAppRepositoryCode(DepotInfo& depotInfo)
|
|||||||
|
|
||||||
repositorySourceBaseURLs.Add(depotInfo.BaseURL());
|
repositorySourceBaseURLs.Add(depotInfo.BaseURL());
|
||||||
|
|
||||||
// TODO; better API call handling around errors.
|
// TODO; better API call handling around errors.
|
||||||
|
|
||||||
if (fWebAppInterface.RetrieveRepositoriesForSourceBaseURLs(
|
if (fWebAppInterface.RetrieveRepositoriesForSourceBaseURLs(
|
||||||
repositorySourceBaseURLs, repositoriesEnvelope) == B_OK
|
repositorySourceBaseURLs, repositoriesEnvelope) == B_OK
|
||||||
&& repositoriesEnvelope.FindMessage("result", &result) == B_OK
|
&& repositoriesEnvelope.FindMessage("result", &result) == B_OK
|
||||||
&& result.FindDouble("total", &total) == B_OK) {
|
&& result.FindDouble("total", &total) == B_OK) {
|
||||||
|
|
||||||
if ((int64) total > 0) {
|
if ((int64)total > 0) {
|
||||||
BMessage repositories;
|
BMessage repositories;
|
||||||
BMessage repository;
|
BMessage repository;
|
||||||
BString repositoryCode;
|
BString repositoryCode;
|
||||||
@@ -869,7 +869,8 @@ Model::PopulateWebAppRepositoryCode(DepotInfo& depotInfo)
|
|||||||
depotInfo.WebAppRepositoryCode().String(),
|
depotInfo.WebAppRepositoryCode().String(),
|
||||||
depotInfo.Name().String());
|
depotInfo.Name().String());
|
||||||
} else {
|
} else {
|
||||||
printf("unable to find the 'code' in the api response for local depot '%s'\n",
|
printf("unable to find the 'code' in the api response for "
|
||||||
|
"local depot '%s'\n",
|
||||||
depotInfo.Name().String());
|
depotInfo.Name().String());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -881,7 +882,8 @@ Model::PopulateWebAppRepositoryCode(DepotInfo& depotInfo)
|
|||||||
depotInfo.BaseURL().String());
|
depotInfo.BaseURL().String());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("missing base url for depot info %s --> will not obtain web app repository code\n",
|
printf("missing base url for depot info %s --> will not obtain web app "
|
||||||
|
"repository code\n",
|
||||||
depotInfo.Name().String());
|
depotInfo.Name().String());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1075,7 +1077,6 @@ Model::_PopulatePackageInfos(PackageList& packages, bool fromCacheOnly,
|
|||||||
|
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
// Parse message
|
// Parse message
|
||||||
// info.PrintToStream();
|
|
||||||
BMessage result;
|
BMessage result;
|
||||||
BMessage pkgs;
|
BMessage pkgs;
|
||||||
if (info.FindMessage("result", &result) == B_OK
|
if (info.FindMessage("result", &result) == B_OK
|
||||||
|
|||||||
Reference in New Issue
Block a user