From a983fbdad590a1905ced5ee75034b2bac9a853ad Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 13 Jan 2010 01:46:05 +0000 Subject: fixed packet length --- src/packetSource.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/packetSource.cpp') diff --git a/src/packetSource.cpp b/src/packetSource.cpp index 9eaedc6..fa4abd0 100644 --- a/src/packetSource.cpp +++ b/src/packetSource.cpp @@ -94,7 +94,7 @@ void UDPPacketSource::onResolve(PacketSourceResolverIt& it) if(sockets_.size() > 1) { std::list::iterator it = sockets_.begin(); for(;it != sockets_.end(); ++it) { - it->len_ = 1600; // TODO packet size + it->len_ = MAX_PACKET_LENGTH; it->buf_ = new u_int8_t[it->len_]; if(!it->buf_) AnytunError::throwErr() << "memory error"; @@ -127,9 +127,6 @@ void UDPPacketSource::recv_thread(std::list::iterator it) result.it_ = it; for(;;) { it->sem_->down(); - - cLog.msg(Log::PRIO_DEBUG) << "calling recv() for " << it->sock_->local_endpoint(); - result.len_ = static_cast(it->sock_->receive_from(boost::asio::buffer(it->buf_, it->len_), result.remote_)); { Lock lock(thread_result_mutex_); -- cgit v1.2.3