param: seek to the beginning of the file before re-trying a failed export attempt

This commit is contained in:
Beat Küng
2017-07-24 13:13:37 +02:00
committed by Lorenz Meier
parent 9d924bea3f
commit 8923664f30
+4
View File
@@ -947,6 +947,10 @@ param_save_default(void)
while (res != OK && attempts > 0) {
res = param_export(fd, false);
attempts--;
if (res != OK) {
lseek(fd, 0, SEEK_SET); // jump back to the beginning of the file
}
}
if (res != OK) {