mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Compat: fix clash with socket() macro, Sentry: Add LogDebug
This commit is contained in:
@@ -12,9 +12,9 @@ using DWORD = unsigned long;
|
||||
using PDWORD = unsigned long*;
|
||||
using LPDWORD = unsigned long*;
|
||||
char _getch();
|
||||
inline void CloseSocketProper(int socket) {
|
||||
shutdown(socket, SHUT_RDWR);
|
||||
close(socket);
|
||||
inline void CloseSocketProper(int TheSocket) {
|
||||
shutdown(TheSocket, SHUT_RDWR);
|
||||
close(TheSocket);
|
||||
}
|
||||
#endif // unix
|
||||
|
||||
@@ -23,9 +23,9 @@ inline void CloseSocketProper(int socket) {
|
||||
#ifdef WIN32
|
||||
#include <conio.h>
|
||||
#include <winsock2.h>
|
||||
inline void CloseSocketProper(SOCKET socket) {
|
||||
shutdown(socket, SD_BOTH);
|
||||
closesocket(socket);
|
||||
inline void CloseSocketProper(SOCKET TheSocket) {
|
||||
shutdown(TheSocket, SD_BOTH);
|
||||
closesocket(TheSocket);
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <sentry.h>
|
||||
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
// TODO possibly use attach_stacktrace
|
||||
|
||||
@@ -16,6 +17,7 @@ public:
|
||||
void PrintWelcome();
|
||||
void SetupUser();
|
||||
void Log(sentry_level_t level, const std::string& logger, const std::string& text);
|
||||
void LogDebug(const std::string& text, const std::string& file, const std::string& line);
|
||||
void AddExtra(const std::string& key, const sentry_value_t& value);
|
||||
void AddExtra(const std::string& key, const std::string& value);
|
||||
void LogException(const std::exception& e, const std::string& file, const std::string& line);
|
||||
@@ -25,6 +27,7 @@ public:
|
||||
|
||||
private:
|
||||
bool mValid { true };
|
||||
std::mutex mMutex;
|
||||
};
|
||||
|
||||
#endif // SENTRY_H
|
||||
|
||||
Reference in New Issue
Block a user