6.6.0.3 - Change filename of configuration backup from using FriendlyName1 to Hostname solving diacritic issues

Change filename of configuration backup from using FriendlyName1 to Hostname solving diacritic issues (#2422)
This commit is contained in:
Theo Arends 2019-07-25 14:18:28 +02:00
parent c2413a2256
commit 250c991c97
3 changed files with 12 additions and 4 deletions

View File

@ -1,9 +1,12 @@
/*********************************************************************************************\ /*********************************************************************************************\
* 6.6.0.3 20190725
* Change filename of configuration backup from using FriendlyName1 to Hostname solving diacritic issues (#2422)
*
* 6.6.0.2 20190714 * 6.6.0.2 20190714
* Change commands Var and Mem to show all parameters when no index is given (#6107)
* Add command SetOption67 0/1 to disable or enable a buzzer as used in iFan03 * Add command SetOption67 0/1 to disable or enable a buzzer as used in iFan03
* Add command DisplayWidth to set pixel width on supported devices * Add command DisplayWidth to set pixel width on supported devices
* Add command DisplayHeight to set pixel height on supported devices * Add command DisplayHeight to set pixel height on supported devices
* Change commands Var and Mem to show all parameters when no index is given (#6107)
* Add support for Sonoff iFan03 as module 71 (#5988) * Add support for Sonoff iFan03 as module 71 (#5988)
* Add support for a buzzer * Add support for a buzzer
* Add support for IRSend long press ('repeat' feature from IRRemoteESP8266) (#6074) * Add support for IRSend long press ('repeat' feature from IRRemoteESP8266) (#6074)

View File

@ -20,6 +20,6 @@
#ifndef _SONOFF_VERSION_H_ #ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_
const uint32_t VERSION = 0x06060002; const uint32_t VERSION = 0x06060003;
#endif // _SONOFF_VERSION_H_ #endif // _SONOFF_VERSION_H_

View File

@ -1673,8 +1673,13 @@ void HandleBackupConfiguration(void)
WebServer->setContentLength(sizeof(Settings)); WebServer->setContentLength(sizeof(Settings));
char attachment[100]; char attachment[100];
char friendlyname[sizeof(Settings.friendlyname[0])];
snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), NoAlNumToUnderscore(friendlyname, Settings.friendlyname[0]), my_version); // char friendlyname[sizeof(Settings.friendlyname[0])];
// snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), NoAlNumToUnderscore(friendlyname, Settings.friendlyname[0]), my_version);
char hostname[sizeof(my_hostname)];
snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), NoAlNumToUnderscore(hostname, my_hostname), my_version);
WebServer->sendHeader(F("Content-Disposition"), attachment); WebServer->sendHeader(F("Content-Disposition"), attachment);
WSSend(200, CT_STREAM, ""); WSSend(200, CT_STREAM, "");