Skip to content

Commit

Permalink
do not close local shell emsesp#1926
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Aug 6, 2024
1 parent 0e86558 commit 0105338
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/uuid-console/src/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void Shell::stop() {

blocking_data->stop_ = true;
} else {
if (running()) {
if (running() && !has_flags(CommandFlags::LOCAL)) { // do not close local shell
stopped_ = true;
stopped();
}
Expand Down
2 changes: 2 additions & 0 deletions lib/uuid-console/src/uuid/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
#include <mutex>
#endif

enum CommandFlags : uint8_t { USER = 0, ADMIN = (1 << 0), LOCAL = (1 << 1) };

namespace uuid {

/**
Expand Down
2 changes: 0 additions & 2 deletions src/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

namespace emsesp {

enum CommandFlags : uint8_t { USER = 0, ADMIN = (1 << 0), LOCAL = (1 << 1) };

enum ShellContext : uint8_t { MAIN = 0, SYSTEM, END };

class EMSESP;
Expand Down

0 comments on commit 0105338

Please sign in to comment.