You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
press disk rotate button (button A) and disks are not rotated
The file handles are reset when mounting from webui and not recreated in populate_slots_from_config() and the disk rotate function checks for file handles being null.
This attempt at recreating the file handle sometimes worked, but not always and I'm not sure why. Maybe there's another way to do it.
void sioFuji::_populate_slots_from_config()
{
char flag[3] = {'r', 0, 0};
for (int i = 0; i < MAX_HOSTS; i++)
{
if (Config.get_host_type(i) == fnConfig::host_types::HOSTTYPE_INVALID)
_fnHosts[i].set_hostname("");
else
_fnHosts[i].set_hostname(Config.get_host_name(i).c_str());
}
for (int i = 0; i < MAX_DISK_DEVICES; i++)
{
_fnDisks[i].reset();
if (Config.get_mount_host_slot(i) != HOST_SLOT_INVALID)
{
if (Config.get_mount_host_slot(i) >= 0 && Config.get_mount_host_slot(i) <= MAX_HOSTS)
{
strlcpy(_fnDisks[i].filename,
Config.get_mount_path(i).c_str(), sizeof(fujiDisk::filename));
_fnDisks[i].host_slot = Config.get_mount_host_slot(i);
if (Config.get_mount_mode(i) == fnConfig::mount_modes::MOUNTMODE_WRITE)
{
_fnDisks[i].access_mode = DISK_ACCESS_MODE_WRITE;
flag[1] = '+';
}
else
_fnDisks[i].access_mode = DISK_ACCESS_MODE_READ;
// Open the file
_fnDisks[i].fileh = _fnHosts[Config.get_mount_host_slot(i)].file_open(_fnDisks[i].filename, _fnDisks[i].filename, sizeof(_fnDisks[i].filename), flag);
}
else
Debug_printf("populate_slots_from_config: slot %d out of range\n", i);
}
else
Debug_printf("populate_slots_from_config: invalid host slot %d\n", i);
}
}
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
The file handles are reset when mounting from webui and not recreated in
populate_slots_from_config()
and the disk rotate function checks for file handles being null.This attempt at recreating the file handle sometimes worked, but not always and I'm not sure why. Maybe there's another way to do it.
The text was updated successfully, but these errors were encountered: