From e191eab68d905bfe14e3590a92fa653f0ae2ebce Mon Sep 17 00:00:00 2001 From: Markus Grüneis Date: Thu, 18 Feb 2010 09:15:27 +0000 Subject: non-functional changes only: use standard writing of stdint.h types; still import from boost (compiler compatibility) --- src/packetSource.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/packetSource.cpp') diff --git a/src/packetSource.cpp b/src/packetSource.cpp index 9a86ef4..bd3590d 100644 --- a/src/packetSource.cpp +++ b/src/packetSource.cpp @@ -95,7 +95,7 @@ void UDPPacketSource::onResolve(PacketSourceResolverIt& it) std::list::iterator it = sockets_.begin(); for(; it != sockets_.end(); ++it) { it->len_ = MAX_PACKET_LENGTH; - it->buf_ = new u_int8_t[it->len_]; + it->buf_ = new uint8_t[it->len_]; if(!it->buf_) { AnytunError::throwErr() << "memory error"; } @@ -128,7 +128,7 @@ void UDPPacketSource::recv_thread(std::list::iterator it) result.it_ = it; for(;;) { it->sem_->down(); - result.len_ = static_cast(it->sock_->receive_from(boost::asio::buffer(it->buf_, it->len_), result.remote_)); + result.len_ = static_cast(it->sock_->receive_from(boost::asio::buffer(it->buf_, it->len_), result.remote_)); { Lock lock(thread_result_mutex_); thread_result_queue_.push(result); @@ -137,10 +137,10 @@ void UDPPacketSource::recv_thread(std::list::iterator it) } } -u_int32_t UDPPacketSource::recv(u_int8_t* buf, u_int32_t len, PacketSourceEndpoint& remote) +uint32_t UDPPacketSource::recv(uint8_t* buf, uint32_t len, PacketSourceEndpoint& remote) { if(sockets_.size() == 1) { - return static_cast(sockets_.front().sock_->receive_from(boost::asio::buffer(buf, len), remote)); + return static_cast(sockets_.front().sock_->receive_from(boost::asio::buffer(buf, len), remote)); } thread_result_sem_.down(); @@ -158,7 +158,7 @@ u_int32_t UDPPacketSource::recv(u_int8_t* buf, u_int32_t len, PacketSourceEndpoi return len; } -void UDPPacketSource::send(u_int8_t* buf, u_int32_t len, PacketSourceEndpoint remote) +void UDPPacketSource::send(uint8_t* buf, uint32_t len, PacketSourceEndpoint remote) { std::list::iterator it = sockets_.begin(); for(; it != sockets_.end(); ++it) { -- cgit v1.2.3