Skip to content

Commit f34b74b

Browse files
authored
Give DDF content precedence over legacy sensor load (dresden-elektronik#7957)
1 parent 1122387 commit f34b74b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

database.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -3505,17 +3505,13 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
35053505
return 0;
35063506
}
35073507

3508-
const int itemCount = DB_GetSubDeviceItemCount(sensor.item(RAttrUniqueId)->toLatin1String());
3509-
3510-
if (itemCount == 0)
3511-
{
3512-
DBG_Printf(DBG_INFO, "DB legacy loading sensor %s %s, later handled by DDF %s\n", qPrintable(sensor.name()), qPrintable(sensor.id()), qPrintable(ddf.product));
3513-
}
3514-
else if (DEV_TestManaged() || DDF_IsStatusEnabled(ddf.status))
3508+
if (DEV_TestManaged() || DDF_IsStatusEnabled(ddf.status))
35153509
{
35163510
DBG_Printf(DBG_INFO, "DB skip loading sensor %s %s, handled by DDF %s\n", qPrintable(sensor.name()), qPrintable(sensor.id()), qPrintable(ddf.product));
35173511
return 0;
35183512
}
3513+
3514+
DBG_Printf(DBG_INFO, "DB legacy loading sensor %s %s, should be added into DDF %s\n", qPrintable(sensor.name()), qPrintable(sensor.id()), qPrintable(ddf.product));
35193515
}
35203516
}
35213517

0 commit comments

Comments
 (0)