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

fix: const cast pair.first access for mg_websocket_write #8264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions libs/viewer/src/RemoteServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ bool MessageReceiver::handleData(CivetServer* server, struct mg_connection* conn

void MessageSender::sendMessage(const char* label, const char* buffer, size_t bufsize) {
for (auto iter : connections) {
mg_websocket_write(iter.first, 0x80, label, strlen(label) + 1);
mg_websocket_write(iter.first, 0x80, buffer, bufsize);
mg_websocket_write(const_cast<mg_connection *>(iter.first), 0x80, label, strlen(label) + 1);
mg_websocket_write(const_cast<mg_connection *>(iter.first), 0x80, buffer, bufsize);
}
}

Expand Down
Loading