summaryrefslogtreecommitdiff
path: root/src/components/ble/FSService.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-06-06 18:27:54 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-06-06 23:09:58 (GMT)
commit7c45f185a32c7bcff47c8fda1acdec82d3213717 (patch)
tree53b0419fe2a19e6ec5c89d0be0a11dcd8d4ceb00 /src/components/ble/FSService.cpp
parent94b1b330fc1f6e941a797fedabade4e790e28bc2 (diff)
parent35dcf8c8607483c104711c9398d47d57147f4389 (diff)
Merge remote-tracking branch 'origin/develop' into analog24
Diffstat (limited to 'src/components/ble/FSService.cpp')
-rw-r--r--src/components/ble/FSService.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/ble/FSService.cpp b/src/components/ble/FSService.cpp
index 8dc9ed6..fda6b39 100644
--- a/src/components/ble/FSService.cpp
+++ b/src/components/ble/FSService.cpp
@@ -81,7 +81,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
return -1;
}
memcpy(filepath, header->pathstr, plen);
- filepath[plen] = 0; // Copy and null teminate string
+ filepath[plen] = 0; // Copy and null terminate string
ReadResponse resp;
os_mbuf* om;
resp.command = commands::READ_DATA;
@@ -148,7 +148,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
return -1; // TODO make this actually return a BLE notif
}
memcpy(filepath, header->pathstr, plen);
- filepath[plen] = 0; // Copy and null teminate string
+ filepath[plen] = 0; // Copy and null terminate string
fileSize = header->totalSize;
WriteResponse resp;
resp.command = commands::WRITE_PACING;
@@ -193,7 +193,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
memcpy(path, header->pathstr, plen);
- path[plen] = 0; // Copy and null teminate string
+ path[plen] = 0; // Copy and null terminate string
DelResponse resp {};
resp.command = commands::DELETE_STATUS;
int res = fs.FileDelete(path);
@@ -208,7 +208,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
memcpy(path, header->pathstr, plen);
- path[plen] = 0; // Copy and null teminate string
+ path[plen] = 0; // Copy and null terminate string
MKDirResponse resp {};
resp.command = commands::MKDIR_STATUS;
resp.modification_time = 0;
@@ -223,7 +223,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
ListDirHeader* header = (ListDirHeader*) om->om_data;
uint16_t plen = header->pathlen;
char path[plen + 1] = {0};
- path[plen] = 0; // Copy and null teminate string
+ path[plen] = 0; // Copy and null terminate string
memcpy(path, header->pathstr, plen);
ListDirResponse resp {};
@@ -290,7 +290,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
header->pathstr[plen] = 0;
char path[header->NewPathLength + 1] = {0};
memcpy(path, &header->pathstr[plen + 1], header->NewPathLength);
- path[header->NewPathLength] = 0; // Copy and null teminate string
+ path[header->NewPathLength] = 0; // Copy and null terminate string
MoveResponse resp {};
resp.command = commands::MOVE_STATUS;
int8_t res = (int8_t) fs.Rename(header->pathstr, path);