Skip to content

Commit 4d0fac9

Browse files
authored
Merge pull request #122 from SenaxInc/copilot/fix-arduino-compilation-error-again
Fix Arduino compilation error: add forward declarations for FTP functions
2 parents 7a058cb + 9581347 commit 4d0fac9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ static bool pinMatches(const char *pin) {
419419
// Forward declaration for respondStatus (defined later in the web server section)
420420
static void respondStatus(EthernetClient &client, int status, const String &message);
421421

422+
// Forward declarations for FTP backup/restore functions (defined in FTP section)
423+
static bool performFtpBackup(String *errorOut = nullptr);
424+
static bool performFtpRestore(String *errorOut = nullptr);
425+
422426
// Require that a valid admin PIN is configured and provided; respond with 403/400 on failure.
423427
static bool requireValidPin(EthernetClient &client, const char *pinValue) {
424428
if (gConfig.configPin[0] == '\0') {
@@ -6523,7 +6527,7 @@ static bool ftpRestoreClientConfigs(FtpSession &session, String &error, uint8_t
65236527
return true;
65246528
}
65256529

6526-
static bool performFtpBackup(String *errorOut = nullptr) {
6530+
static bool performFtpBackup(String *errorOut) {
65276531
if (!gConfig.ftpEnabled) {
65286532
if (errorOut) *errorOut = F("FTP disabled");
65296533
return false;
@@ -6571,7 +6575,7 @@ static bool performFtpBackup(String *errorOut = nullptr) {
65716575
return true;
65726576
}
65736577

6574-
static bool performFtpRestore(String *errorOut = nullptr) {
6578+
static bool performFtpRestore(String *errorOut) {
65756579
if (!gConfig.ftpEnabled) {
65766580
if (errorOut) *errorOut = F("FTP disabled");
65776581
return false;

0 commit comments

Comments
 (0)