sync code

This commit is contained in:
Ned Wright
2024-09-17 10:53:09 +00:00
parent 3fe0b42fcd
commit 586150fe4f
143 changed files with 1886 additions and 380 deletions

View File

@@ -39,7 +39,7 @@ public:
init()
{
server_fd = socket(AF_INET, SOCK_STREAM, 0);
dbgAssert(server_fd >= 0) << "Failed to open a socket";
dbgAssert(server_fd >= 0) << AlertInfo(AlertTeam::CORE, "messaging i/s") << "Failed to open a socket";
int socket_enable = 1;
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &socket_enable, sizeof(int));

View File

@@ -92,7 +92,10 @@ string
HTTPResponse::toString() const
{
auto code = status_code_to_string.find(status_code);
dbgAssert(code != status_code_to_string.end()) << "Unknown status code " << int(status_code);
dbgAssert(code != status_code_to_string.end())
<< AlertInfo(AlertTeam::CORE, "messaging i/s")
<< "Unknown status code "
<< int(status_code);
return "[Status-code]: " + code->second + ", [Body]: " + (body.empty() ? "{}" : body);
}