Skip to content

Commit 5383979

Browse files
committed
fix smart refresh
1 parent e7a3a57 commit 5383979

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

libnw/sensor/disk_smart.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,14 @@ static void disk_get(PNODE node)
5757
{
5858
BOOL need_update = FALSE;
5959
ULONGLONG ticks = GetTickCount64();
60-
if (ticks > ctx.ticks + 1000 * 60)
60+
INT count = cdi_get_disk_count(NWLC->NwSmart);
61+
if (count != ctx.count || ticks > ctx.ticks + 1000 * 60)
62+
{
6163
need_update = TRUE;
62-
ctx.ticks = ticks;
64+
ctx.ticks = ticks;
65+
ctx.count = count;
66+
}
67+
NWL_NodeAttrSetf(node, "Last Update", NAFLG_FMT_NUMERIC, "%llu", ctx.ticks);
6368
for (INT i = 0; i < ctx.count; i++)
6469
{
6570
if (need_update)

libnw/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#define NWINFO_MAJOR_VERSION 1
99
#define NWINFO_MINOR_VERSION 5
10-
#define NWINFO_MICRO_VERSION 2
11-
#define NWINFO_BUILD_VERSION 2
10+
#define NWINFO_MICRO_VERSION 3
11+
#define NWINFO_BUILD_VERSION 0
1212

1313
#define NWINFO_VERSION NWINFO_MAJOR_VERSION,NWINFO_MINOR_VERSION,NWINFO_MICRO_VERSION,NWINFO_BUILD_VERSION
1414
#define NWINFO_VERSION_STR QUOTE(NWINFO_MAJOR_VERSION.NWINFO_MINOR_VERSION.NWINFO_MICRO_VERSION.NWINFO_BUILD_VERSION)

0 commit comments

Comments
 (0)