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

stop using deprecated functions #3962

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions source/kraken/kraken_zmq.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ www.navitia.io
static void respond(zmq::socket_t& socket,
const std::vector<std::string>& client_id,
const pbnavitia::Response& response) {
zmq::message_t reply(response.ByteSize());
zmq::message_t reply(response.ByteSizeLong());
try {
response.SerializeToArray(reply.data(), response.ByteSize());
response.SerializeToArray(reply.data(), response.ByteSizeLong());
} catch (const google::protobuf::FatalException& e) {
auto logger = log4cplus::Logger::getInstance("worker");
LOG4CPLUS_ERROR(logger, "failure during serialization: " << e.what());
pbnavitia::Response error_response;
error_response.mutable_error()->set_id(pbnavitia::Error::internal_error);
error_response.mutable_error()->set_message(e.what());
reply.rebuild(error_response.ByteSize());
error_response.SerializeToArray(reply.data(), error_response.ByteSize());
reply.rebuild(error_response.ByteSizeLong());
error_response.SerializeToArray(reply.data(), error_response.ByteSizeLong());
}
for (const auto& idx : client_id) {
z_send(socket, idx, ZMQ_SNDMORE);
z_send(socket, idx, zmq::send_flags::sndmore);
}
socket.send(reply);
socket.send(reply, zmq::send_flags::none);
}

static pbnavitia::Response create_error_response(std::string error_message, pbnavitia::Error_error_id error_id) {
Expand Down
2 changes: 1 addition & 1 deletion source/utils
Submodule utils updated 2 files
+7 −7 zmq.cpp
+2 −2 zmq.h