Commit 41ec7e58 authored by Emmanuel Milou's avatar Emmanuel Milou

nothing

parent 3baf3e36
......@@ -39,8 +39,8 @@ EventThread::~EventThread (void)
void
EventThread::run (void)
{
stopIt = false;
while(!stopIt) {
//stopIt = false;
while(!testCancel()) {
_linkthread->getEvent();
}
}
......
......@@ -2134,18 +2134,18 @@ ManagerImpl::sendRegister( const ::DBus::String& accountID , bool expire )
// Test on the value freshly updated
if ( acc->isEnabled() ) {
// As we don't support multiple SIP account, we have to unregister everything before
AccountMap::iterator iter = _accountMap.begin();
while ( iter != _accountMap.end() ) {
if ( iter->second ) {
setConfig( iter->first , CONFIG_ACCOUNT_ENABLE , false );
iter->second->unregisterVoIPLink();
}
iter++;
}
//AccountMap::iterator iter = _accountMap.begin();
//while ( iter != _accountMap.end() ) {
//if ( iter->second ) {
//setConfig( iter->first , CONFIG_ACCOUNT_ENABLE , false );
//iter->second->unregisterVoIPLink();
//}
//iter++;
//}
// Verify we aren't already registered, then register
//if (acc->getRegistrationState() != VoIPLink::Registered) {
_debug("Send register for account %s\n" , accountID.c_str());
setConfig( accountID , CONFIG_ACCOUNT_ENABLE , true );
//setConfig( accountID , CONFIG_ACCOUNT_ENABLE , true );
acc->registerVoIPLink();
//}
} else {
......
......@@ -217,7 +217,6 @@ void
SIPVoIPLink::getEvent()
{
char* tmp2;
const char* localport = ""+_localPort;
eXosip_event_t* event = eXosip_event_wait(0, 50);
eXosip_lock();
eXosip_automatic_action();
......@@ -233,11 +232,11 @@ SIPVoIPLink::getEvent()
_debugMid(" !EXOSIP_REGISTRATION_NEW event is not implemented\n");
break;
case EXOSIP_REGISTRATION_SUCCESS: /** 01 < user is successfully registred. */
_debugMid(" !EXOSIP_REGISTRATION_SUCCESS \n");
_debugMid(" !EXOSIP_REGISTRATION_SUCCESS ---> %s\n" , getAccountID().c_str());
if(_eXosipRegID == EXOSIP_ERROR_STD){
_debug("Successfully Unregister account ID = %s\n" , getAccountID().c_str());
setRegistrationState(Unregistered);
if( _evThread ) _evThread->stop();
//if( _evThread ) _evThread->stop();
}
else{
_debug("Successfully Register account ID = %s\n" , getAccountID().c_str());
......@@ -1421,6 +1420,7 @@ SIPVoIPLink::SIPCallRequestFailure(eXosip_event_t *event)
case SIP_NOT_ACCEPTABLE_HERE: // 488 */
// Display error on the screen phone
{
_debug("--------------------------------------------------------------error message: %s\n", event->response->reason_phrase);
SIPCall* call = findSIPCallWithCid(event->cid);
if (call!=0) {
CallID& id = call->getCallId();
......
......@@ -84,13 +84,13 @@ VoIPLink::clearCallMap()
void
VoIPLink::setRegistrationState(const enum RegistrationState state, const std::string& errorMessage)
{
/** @todo Push to the GUI when state changes */
_registrationState = state;
_registrationError = errorMessage;
std::string acc_ID = getAccountID();
_debug("Set registration state for account %s\n" , acc_ID.c_str());
/** Push to the GUI when state changes */
switch (state) {
case Registered:
Manager::instance().registrationSucceed(acc_ID);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment