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

Small fixes that were missed in the last cpiface commit. #88

Merged
merged 1 commit into from
Jul 9, 2020
Merged
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
14 changes: 10 additions & 4 deletions cpiface/zmq-cpiface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,18 @@ int main(int argc, char **argv) {

// Process messages from either socket
while (true) {
static const zmq_pollitem_t items[] = {
zmq_pollitem_t items[] = {
{receiver, 0, ZMQ_POLLIN, 0},
};
if (zmq_poll((zmq_pollitem_t *)items, 1, -1) < 0) {
std::cerr << "ZMQ poll failed!: " << strerror(errno) << std::endl;
return EXIT_FAILURE;
std::cerr << "ZMQ poll failed!: " << strerror(errno);
if (errno != EINTR) {
std::cerr << std::endl;
return EXIT_FAILURE;
} else {
std::cerr << "Retrying..." << std::endl;
continue;
}
}
if (items[0].revents & ZMQ_POLLIN) {
struct msgbuf rbuf;
Expand Down Expand Up @@ -342,7 +348,7 @@ int main(int argc, char **argv) {
BessClient b(CreateChannel(std::string(args.bessd_ip) + ":" +
std::to_string(args.bessd_port),
InsecureChannelCredentials()));
b.runRemoveCommand(ntohl(rbuf.sess_entry.ue_addr.u.ipv4_addr),
b.runRemoveCommand((rbuf.sess_entry.ue_addr.u.ipv4_addr),
args.encapmod);
std::map<std::uint64_t, bool>::iterator it = zmq_sess_map.find(
SESS_ID((rbuf.sess_entry.ue_addr.u.ipv4_addr), DEFAULT_BEARER));
Expand Down