Skip to content

Commit

Permalink
squash w/ [7229] Run clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Dec 5, 2024
1 parent f9795e6 commit 826fa5e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions plugins/network/src/ssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ irods::error ssl_socket_read(
}

fd_set set;
struct timeval timeout
{
};
// clang-format off
struct timeval timeout{};
// clang-format on
int len_to_read = _length;
char* read_ptr = static_cast<char*>(_buffer);
_bytes_read = 0;
Expand Down
6 changes: 3 additions & 3 deletions plugins/network/src/tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
irods::error tcp_socket_read(int _socket, void* _buffer, int _length, int& _bytes_read, struct timeval* _time_value)
{
fd_set set;
struct timeval timeout
{
};
// clang-format off
struct timeval timeout{};
// clang-format on
int len_to_read = _length;
char* read_ptr = static_cast<char*>(_buffer);
_bytes_read = 0;
Expand Down
8 changes: 4 additions & 4 deletions server/main_server/src/agent_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@ namespace
{
namespace logger = irods::experimental::log;

// clang-format off
logger::agent::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_AGENT));
logger::agent_factory::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_AGENT_FACTORY));
logger::api::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_API));
logger::authentication::set_level(
logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_AUTHENTICATION));
logger::authentication::set_level( logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_AUTHENTICATION));
logger::database::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_DATABASE));
logger::genquery2::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_GENQUERY2));
logger::legacy::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_LEGACY));
Expand All @@ -447,6 +447,7 @@ namespace
logger::resource::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_RESOURCE));
logger::rule_engine::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_RULE_ENGINE));
logger::sql::set_level(logger::get_level_from_config(irods::KW_CFG_LOG_LEVEL_CATEGORY_SQL));
// clang-format on
} // load_log_levels_for_loggers

auto setup_signal_handlers() -> int
Expand Down Expand Up @@ -822,8 +823,7 @@ namespace
rsComm.thread_ctx = static_cast<thread_context*>(std::malloc(sizeof(thread_context)));

bool require_cs_neg = false;
int status =
initRsCommWithStartupPack(&rsComm, startupPack, require_cs_neg); // This version just uses the startupPack.
int status = initRsCommWithStartupPack(&rsComm, startupPack, require_cs_neg);

// manufacture a network object for comms
ret = irods::network_factory(&rsComm, net_obj);
Expand Down
37 changes: 19 additions & 18 deletions server/main_server/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,11 @@ Environment Variables:
{
// Become a background process.
switch (fork()) {
case -1:
_exit(1);
case 0:
break;
default:
_exit(0);
// clang-format off
case -1: _exit(1);
case 0: break;
default: _exit(0);
// clang-format on
}

// Become session leader.
Expand All @@ -512,12 +511,11 @@ Environment Variables:

// Make sure we aren't the session leader.
switch (fork()) {
case -1:
_exit(1);
case 0:
break;
default:
_exit(0);
// clang-format off
case -1: _exit(1);
case 0: break;
default: _exit(0);
// clang-format on
}

umask(0);
Expand Down Expand Up @@ -1378,12 +1376,15 @@ Environment Variables:
file.close();

// 3. Write the contents of the stacktrace file to syslog.
irods::experimental::log::server::critical(
{{"log_message", boost::stacktrace::to_string(stacktrace)},
{"stacktrace_agent_pid", pid},
{"stacktrace_timestamp_utc", fmt::format("{}.{}Z", utc_ss.str(), remaining_millis)},
{"stacktrace_timestamp_epoch_seconds", epoch_seconds},
{"stacktrace_timestamp_epoch_milliseconds", remaining_millis}});
// clang-format off
irods::experimental::log::server::critical({
{"log_message", boost::stacktrace::to_string(stacktrace)},
{"stacktrace_agent_pid", pid},
{"stacktrace_timestamp_utc", fmt::format("{}.{}Z", utc_ss.str(), remaining_millis)},
{"stacktrace_timestamp_epoch_seconds", epoch_seconds},
{"stacktrace_timestamp_epoch_milliseconds", remaining_millis}
});
// clang-format on

// 4. Delete the stacktrace file.
//
Expand Down

0 comments on commit 826fa5e

Please sign in to comment.