From b35d79b1feee163600305db7dcde9b4a7150f1cc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 28 Jun 2014 18:59:22 +0000 Subject: while(1) vs. for(;;) --- src/anyrtpproxy/anyrtpproxy.cpp | 4 ++-- src/anyrtpproxy/commandHandler.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/anyrtpproxy') diff --git a/src/anyrtpproxy/anyrtpproxy.cpp b/src/anyrtpproxy/anyrtpproxy.cpp index abb6a03..c7b7343 100644 --- a/src/anyrtpproxy/anyrtpproxy.cpp +++ b/src/anyrtpproxy/anyrtpproxy.cpp @@ -70,7 +70,7 @@ void listener(RtpSession::proto::socket* sock1, RtpSession::proto::socket* sock2 Buffer buf(uint32_t(MAX_PACKET_SIZE)); RtpSession::proto::endpoint remote_end; - while(1) { + for(;;) { buf.setLength(MAX_PACKET_SIZE); uint32_t len=0; if(dir == 1) { @@ -148,7 +148,7 @@ void listenerManager(void* p) SyncQueue* queue_ = reinterpret_cast(p); std::map listenerMap; - while(1) { + for(;;) { try { std::string call_id = gCallIdQueue.front(); // waits for semaphor and returns next call_id gCallIdQueue.pop(); diff --git a/src/anyrtpproxy/commandHandler.cpp b/src/anyrtpproxy/commandHandler.cpp index fc84c6f..1578659 100644 --- a/src/anyrtpproxy/commandHandler.cpp +++ b/src/anyrtpproxy/commandHandler.cpp @@ -81,7 +81,7 @@ void CommandHandler::run(void* s) proto::endpoint remote_end; int len; - while(1) { + for(;;) { buf.setLength(MAX_COMMAND_LENGTH); len = self->control_sock_.receive_from(boost::asio::buffer(buf.getBuf(), buf.getLength()), remote_end); -- cgit v1.2.3