summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anyrtpproxy/anyrtpproxy.cpp4
-rw-r--r--src/anyrtpproxy/commandHandler.cpp2
-rw-r--r--src/anytun.cpp4
-rw-r--r--src/posix/signalHandler.hpp2
-rw-r--r--src/resolver.cpp2
-rw-r--r--src/signalController.cpp2
6 files changed, 8 insertions, 8 deletions
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<SyncQueue*>(p);
std::map<std::string, ListenerData*> 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);
diff --git a/src/anytun.cpp b/src/anytun.cpp
index f08ed52..a2ed567 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -146,7 +146,7 @@ void sender(TunDevice* dev, PacketSource* src)
uint16_t mux = gOpt.getMux();
PacketSourceEndpoint emptyEndpoint;
- while(1) {
+ for(;;) {
plain_packet.setLength(MAX_PACKET_LENGTH);
encrypted_packet.withAuthTag(false);
encrypted_packet.setLength(MAX_PACKET_LENGTH);
@@ -237,7 +237,7 @@ void receiver(TunDevice* dev, PacketSource* src)
EncryptedPacket encrypted_packet(MAX_PACKET_LENGTH, auth_tag_length);
PlainPacket plain_packet(MAX_PACKET_LENGTH);
- while(1) {
+ for(;;) {
PacketSourceEndpoint remote_end;
plain_packet.setLength(MAX_PACKET_LENGTH);
diff --git a/src/posix/signalHandler.hpp b/src/posix/signalHandler.hpp
index b63d6ea..dc14f03 100644
--- a/src/posix/signalHandler.hpp
+++ b/src/posix/signalHandler.hpp
@@ -87,7 +87,7 @@ void handleSignal()
struct timespec timeout;
sigset_t signal_set;
int sigNum;
- while(1) {
+ for(;;) {
sigemptyset(&signal_set);
sigaddset(&signal_set, SIGINT);
sigaddset(&signal_set, SIGQUIT);
diff --git a/src/resolver.cpp b/src/resolver.cpp
index db94358..afca093 100644
--- a/src/resolver.cpp
+++ b/src/resolver.cpp
@@ -117,7 +117,7 @@ void Resolver::run()
{
cLog.msg(Log::PRIO_DEBUG) << "Resolver Thread started";
- while(1) {
+ for(;;) {
try {
io_service_.run();
io_service_.reset();
diff --git a/src/signalController.cpp b/src/signalController.cpp
index 67854d3..f4ae059 100644
--- a/src/signalController.cpp
+++ b/src/signalController.cpp
@@ -95,7 +95,7 @@ int SignalController::run()
}
int ret = 0;
- while(1) {
+ for(;;) {
sigQueueSem.down();
SigPair sig;
{