Skip to content

Commit

Permalink
Fix Centos 65 agent compilation issues.
Browse files Browse the repository at this point in the history
Closes-Bug: #1532159

Change-Id: Ia8b77619c80737000d5bd949534c9e0a16967359
  • Loading branch information
ashoksr committed Jan 8, 2016
1 parent fc42552 commit 6f97f2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/ksync/ksync_sock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ void KSyncSockNetlink::Receive(mutable_buffers_1 buf) {

//Udp socket class for interacting with kernel
KSyncSockUdp::KSyncSockUdp(boost::asio::io_service &ios, int port)
: sock_(ios, ip::udp::endpoint(ip::udp::v4(), 0)), server_ep_(ip::address::from_string("127.0.0.1"), port) {
: sock_(ios, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0)),
server_ep_(boost::asio::ip::address::from_string("127.0.0.1"), port) {
//sock_.open(ip::udp::v4());
}

Expand Down Expand Up @@ -285,18 +286,18 @@ size_t KSyncSockUdp::SendTo(const char *data, uint32_t data_len,
}

void KSyncSockUdp::AsyncReceive(mutable_buffers_1 buf, HandlerCb cb) {
ip::udp::endpoint ep;
boost::asio::ip::udp::endpoint ep;
sock_.async_receive_from(buf, ep, cb);
}

void KSyncSockUdp::Receive(mutable_buffers_1 buf) {
ip::udp::endpoint ep;
boost::asio::ip::udp::endpoint ep;
sock_.receive_from(buf, ep);
}

//TCP socket class for interacting with vrouter
KSyncSockTcp::KSyncSockTcp(EventManager *evm,
ip::address ip_address, int port) : TcpServer(evm), evm_(evm),
boost::asio::ip::address ip_address, int port) : TcpServer(evm), evm_(evm),
session_(NULL), server_ep_(ip_address, port), connect_complete_(false) {
session_ = CreateSession();
Connect(session_, server_ep_);
Expand Down Expand Up @@ -626,7 +627,8 @@ void KSyncSockUdp::Init(io_service &ios, int count, int port) {
}
}

void KSyncSockTcp::Init(EventManager *evm, int count, ip::address ip_addr,
void KSyncSockTcp::Init(EventManager *evm, int count,
boost::asio::ip::address ip_addr,
int port) {
KSyncSock::Init(count);
SetNetlinkFamilyId(10);
Expand Down
4 changes: 2 additions & 2 deletions src/ksync/ksync_sock_user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,9 @@ void KSyncSockTypeMap::Init(boost::asio::io_service &ios, int count) {
assert(singleton_ == NULL);
singleton_ = new KSyncSockTypeMap(ios);

singleton_->local_ep_.address(ip::address::from_string("127.0.0.1"));
singleton_->local_ep_.address(boost::asio::ip::address::from_string("127.0.0.1"));
singleton_->local_ep_.port(0);
singleton_->sock_.open(ip::udp::v4());
singleton_->sock_.open(boost::asio::ip::udp::v4());
singleton_->sock_.bind(singleton_->local_ep_);
singleton_->local_ep_ = singleton_->sock_.local_endpoint();

Expand Down

0 comments on commit 6f97f2d

Please sign in to comment.