diff --git a/apps/reg_agent/RegistrationAgent.cpp b/apps/reg_agent/RegistrationAgent.cpp index b2eed4e5..91fd925d 100644 --- a/apps/reg_agent/RegistrationAgent.cpp +++ b/apps/reg_agent/RegistrationAgent.cpp @@ -206,7 +206,7 @@ void RegThread::run() { while (!stop_requested()) { for (vector::iterator it = registrations.begin(); - it != registrations.end(); + it != registrations.end() && !stop_requested(); it++) { if (!check_registration(*it)) { diff --git a/apps/reg_agent/RegistrationAgent.h b/apps/reg_agent/RegistrationAgent.h index 1505e54e..630eb41d 100644 --- a/apps/reg_agent/RegistrationAgent.h +++ b/apps/reg_agent/RegistrationAgent.h @@ -77,7 +77,9 @@ class RegistrationAgentFactory: public AmSessionFactory /* makes the thread stop as soon as the app factory begins its destruction */ DBG("Requested the reg agent thread to stop.\n"); dialer.stop(); + INFO("Joining reg_agent thread...\n"); dialer.join(); + INFO("reg_agent thread joined.\n"); } int onLoad();