Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Fix windows build #1683

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Thunder/PluginServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ namespace PluginHost {
ASSERT(callsign.empty() == false);

if (jsonrpc_event.empty() == false) {
JsonData::Events::ForwardMessageParamsData::EventData message({ jsonrpc_event, parameters, callsign });
JsonData::Events::ForwardMessageParamsData::EventInfoData message({ jsonrpc_event, parameters, callsign });
controller->Notify(_T("all"), message);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions Source/core/SocketPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
#define __ERROR_CONNRESET__ WSAECONNRESET
#define __ERROR_NETWORK_UNREACHABLE__ WSAENETUNREACH
PUSH_WARNING(DISABLE_WARNING_THIS_IN_MEMBER_INITIALIZER_LIST)
#else
#endif

#ifdef __APPLE__
#define IPV6_PACKAGE_TYPE IPV6_RECVPKTINFO
#else
#define IPV6_PACKAGE_TYPE IPV6_PKTINFO
#endif
#endif


namespace Thunder {
namespace Core {
Expand Down
11 changes: 6 additions & 5 deletions Source/core/Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ namespace Core {
// then it is up to us.
if (m_hThreadInstance == nullptr)
#endif
std::string convertedName;
if (threadName != nullptr) {
Core::ToString(threadName, convertedName);
}

#ifdef __POSIX__
int err;
Expand All @@ -93,7 +89,6 @@ namespace Core {
ASSERT(err == 0);
}

m_threadName = convertedName;
// If there is no thread, the "new" thread can also not free the destructor,
// then it is up to us.

Expand All @@ -105,10 +100,16 @@ namespace Core {
m_sigExit.SetEvent();
}

std::string convertedName;
if (threadName != nullptr) {
Core::ToString(threadName, convertedName);
}

#ifdef __POSIX__
err = pthread_attr_destroy(&attr);
ASSERT(err == 0);
m_ThreadId = m_hThreadInstance;
m_threadName = convertedName;
#else
if (convertedName.empty() != true) {
ThreadName(convertedName.c_str());
Expand Down
4 changes: 2 additions & 2 deletions Source/plugins/IController.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ namespace Controller {
struct EXTERNAL IEvents : virtual public Core::IUnknown {
enum { ID = RPC::ID_CONTROLLER_EVENTS };

struct Event {
struct EventInfo {
string Event;
string Params /* @opaque @optional */;
string CallSign /* @optional */;
Expand All @@ -212,7 +212,7 @@ namespace Controller {
// All notifications send by any plugin are forwarded over the Controller socket as an event.
// @param callsign: Origin of the message
// @param data: Contents of the message
virtual void ForwardMessage(const Event& data) = 0;
virtual void ForwardMessage(const EventInfo& data) = 0;
};
};

Expand Down