Skip to content

Commit

Permalink
Fix non-static member function
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Sep 7, 2023
1 parent f2d2be8 commit e9c99c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cpp/piscsi/piscsi_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool Piscsi::ExecuteCommand(const CommandContext& context, const PbCommand& comm
switch(command.operation()) {
case LOG_LEVEL: {
const string log_level = GetParam(command, "level");
if (const bool status = executor->SetLogLevel(log_level); !status) {
if (const bool status = PiscsiExecutor::SetLogLevel(log_level); !status) {
context.ReturnLocalizedError(LocalizationKey::ERROR_LOG_LEVEL, log_level);
}
else {
Expand Down Expand Up @@ -481,12 +481,12 @@ int Piscsi::run(span<char *> args)
return EXIT_FAILURE;
}

// current_log_level may have been updated by ParseArguments()
executor->SetLogLevel(current_log_level);

// Create a thread-safe stdout logger to process the log messages
const auto logger = stdout_color_mt("piscsi stdout logger");

// current_log_level may have been updated by ParseArguments()
PiscsiExecutor::SetLogLevel(current_log_level);

if (!InitBus()) {
cerr << "Error: Can't initialize bus" << endl;

Expand Down
2 changes: 1 addition & 1 deletion cpp/piscsi/piscsi_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ bool PiscsiExecutor::ProcessCmd(const CommandContext& context, const PbCommand&
return context.ReturnStatus();
}

bool PiscsiExecutor::SetLogLevel(const string& log_level) const
bool PiscsiExecutor::SetLogLevel(const string& log_level)
{
int id = -1;
int lun = -1;
Expand Down
2 changes: 1 addition & 1 deletion cpp/piscsi/piscsi_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PiscsiExecutor

bool ProcessDeviceCmd(const CommandContext&, const PbDeviceDefinition&, const PbCommand&, bool);
bool ProcessCmd(const CommandContext&, const PbCommand&);
bool SetLogLevel(const string&) const;
static bool SetLogLevel(const string&);
bool Start(PrimaryDevice&, bool) const;
bool Stop(PrimaryDevice&, bool) const;
bool Eject(PrimaryDevice&, bool) const;
Expand Down

0 comments on commit e9c99c5

Please sign in to comment.