Removed ifdef BACFILE where no longer needed. (#1225)
This commit is contained in:
@@ -1266,14 +1266,9 @@ static uint32_t Interval_Offset_Minutes;
|
||||
#if defined BACNET_BACKUP_RESTORE
|
||||
/* number of backup files */
|
||||
#ifndef BACNET_BACKUP_FILE_COUNT
|
||||
#if defined(BACFILE)
|
||||
#define BACNET_BACKUP_FILE_COUNT 1
|
||||
#else
|
||||
#define BACNET_BACKUP_FILE_COUNT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BACNET_BACKUP_FILE_COUNT
|
||||
/* device A will read the Configuration_Files property of the Device object.
|
||||
This property will be used to determine the files to read and in what
|
||||
order the files will be read. The value of the Configuration_Files
|
||||
@@ -1281,7 +1276,6 @@ static uint32_t Interval_Offset_Minutes;
|
||||
configuration File object references before the backup request is
|
||||
accepted by device B. */
|
||||
static uint32_t Configuration_Files[BACNET_BACKUP_FILE_COUNT];
|
||||
#endif
|
||||
/* If the restore is successful, no other actions by device A shall
|
||||
be required, and device B will update the Last_Restore_Time property
|
||||
in its Device object. */
|
||||
@@ -3410,11 +3404,9 @@ void Device_Start_Backup(void)
|
||||
property_list.Proprietary.pList, writable_properties,
|
||||
Device_Read_Property);
|
||||
if (len > 0) {
|
||||
#if defined(BACFILE)
|
||||
(void)bacfile_write_offset(
|
||||
Configuration_Files[0], offset, &object_apdu[0],
|
||||
(uint32_t)len);
|
||||
#endif
|
||||
offset += len;
|
||||
}
|
||||
}
|
||||
@@ -3441,14 +3433,10 @@ void Device_Start_Restore(void)
|
||||
bacapp_timestamp_datetime_set(&Last_Restore_Time, &bdateTime);
|
||||
Backup_State = BACKUP_STATE_PREPARING_FOR_RESTORE;
|
||||
/* create objects from the backup file */
|
||||
#if defined(BACFILE)
|
||||
file_size = bacfile_file_size(Configuration_Files[0]);
|
||||
#endif
|
||||
while (offset < file_size) {
|
||||
#if defined(BACFILE)
|
||||
apdu_len = bacfile_read_offset(
|
||||
Configuration_Files[0], offset, &apdu[0], sizeof(apdu));
|
||||
#endif
|
||||
if (apdu_len > 0) {
|
||||
decoded_len = create_object_decode_service_request(
|
||||
apdu, apdu_len, &create_data);
|
||||
|
||||
Reference in New Issue
Block a user