querywatcher: upstreamed patchset.

This commit is contained in:
Jerome Duval
2018-09-17 12:46:36 +02:00
parent f174c8c925
commit 35ec48dda4
2 changed files with 3 additions and 43 deletions

View File

@@ -1,39 +0,0 @@
From dcc3e419f837c268a497f94081c4ac0aa049f93c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 24 Jun 2017 11:26:26 +0200
Subject: time_t isn't always an int32.
diff --git a/src/App.cpp b/src/App.cpp
index 25a4bac..b96b1b5 100644
--- a/src/App.cpp
+++ b/src/App.cpp
@@ -99,13 +99,21 @@ status_t ExtractQueryVolumes(BNode *node, vollist *volumes) {
// OpenTracker, that's it!
time_t created;
+ int64 created64;
+ int32 created32;
off_t capacity;
- for (int32 index = 0; msg.FindInt32("creationDate", index, &created) == B_OK;
+ for (int32 index = 0; msg.FindInt64("capacity", index, &capacity) == B_OK;
index++) {
-
- if ((msg.FindInt32("creationDate", index, &created) != B_OK)
- || (msg.FindInt64("capacity", index, &capacity) != B_OK))
+
+ if (msg.FindInt64("creationDate", index, &created64) != B_OK) {
+ if (msg.FindInt32("creationDate", index, &created32) != B_OK)
+ return B_ERROR;
+ created = created32;
+ } else
+ created = created64;
+
+ if (msg.FindInt64("capacity", index, &capacity) != B_OK)
return B_ERROR;
BVolume volume;
--
2.12.2

View File

@@ -7,12 +7,11 @@ COPYRIGHT="2003-2004 Michael Armida
2004 Mikael Eiman
2004 Michael Davidson"
LICENSE="Public Domain"
REVISION="5"
srcGitRev="006614d8faf8b2b650aab1e8919b87920496a8c7"
REVISION="6"
srcGitRev="27851d7e9955e6cd9e43e5ae071359550a762e27"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="d4f1414d3f5b007ce8de82229507c2d614c0f5585436d36d368cb380a934896b"
CHECKSUM_SHA256="116b9288d32a9d3e6a2172666672c816e474d145051c5e4b160bb1062dc2ef3a"
SOURCE_DIR="QueryWatcher-$srcGitRev"
PATCHES="querywatcher-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"