diff --git a/configure.ac b/configure.ac index 3fc535bcb9d9a0fe59321928b90cffa7e6a1d6b6..9d66f5b93ed208ecfc7a7e44f0ea22c781c50163 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl Rewrite name of programs to be installed AC_ARG_PROGRAM dnl Automake options -AM_INIT_AUTOMAKE([-Wall -Wno-portability]) +AM_INIT_AUTOMAKE([-Wno-portability]) dnl Improve make variable MAKE AC_PROG_MAKE_SET @@ -97,7 +97,7 @@ dnl Define C++ as default language AC_LANG(C++) dnl Setup C++ compiler flags -CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS $USER_INCLUDES -O0 -g -Wall -Wextra" +CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS $USER_INCLUDES -O0 -g -Wno-return-type" dnl Check for header files AC_FUNC_ALLOCA diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac index b90af938de2786df192558b41aa3befd45ee1f23..fc3a5108d538a149843449ba7d88325bb88129fc 100644 --- a/sflphone-gtk/configure.ac +++ b/sflphone-gtk/configure.ac @@ -1,8 +1,8 @@ -AC_INIT([SFLphone],[0.9.2],[sflphoneteam@savoirfairelinux.com],[sflphone]) +AC_INIT([SFLphone],[0.9.2-7],[sflphoneteam@savoirfairelinux.com],[sflphone]) AM_CONFIG_HEADER(config.h) PACKAGE=SFLphone -VERSION=0.9.2 +VERSION=0.9.2-7 AM_INIT_AUTOMAKE($PACKAGE,$VERSION) diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index 7ed21b2118a4241b4dffd5ef73e120a12848ffe4..68e0e2d423367cc834a682c13e40b233726aea64 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -39,6 +39,7 @@ DBusGConnection * connection; DBusGProxy * callManagerProxy; DBusGProxy * configurationManagerProxy; DBusGProxy * instanceProxy; +DBusGProxy * nameOwnerProxy; static void incoming_call_cb (DBusGProxy *proxy UNUSED, @@ -172,18 +173,32 @@ error_alert(DBusGProxy *proxy UNUSED, sflphone_throw_exception( errCode ); } + +static void nameOwnerChanged(DBusGProxy *proxy, char *name, char *old_owner, char *new_owner, gpointer data ) +{ + + g_print("******************************************************************\n"); + g_print("Owner name of the service %s changed from %s to %s\n", name, old_owner, new_owner); + g_print("******************************************************************\n"); + + if (strcmp(name, "org.sflphone.SFLphone")!=0) return; + +} + gboolean dbus_connect () { GError *error = NULL; connection = NULL; + instanceProxy = NULL; + nameOwnerProxy = NULL; g_type_init (); connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); - if (connection == NULL) + if (error) { g_printerr ("Failed to open connection to bus: %s\n", error->message); @@ -191,13 +206,33 @@ dbus_connect () return FALSE; } + + nameOwnerProxy = dbus_g_proxy_new_for_name_owner( connection, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + &error); + + if( nameOwnerProxy==NULL) + { + g_printerr ("Failed to get proxy to NameOwner\n"); + return FALSE; + } + + dbus_g_proxy_add_signal( nameOwnerProxy, "NameOwnerChanged", + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID); + dbus_g_proxy_connect_signal (nameOwnerProxy, "NameOwnerChanged", + G_CALLBACK (nameOwnerChanged), NULL, NULL); + + /* Create a proxy object for the "bus driver" (name "org.freedesktop.DBus") */ - instanceProxy = dbus_g_proxy_new_for_name (connection, + instanceProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/Instance", - "org.sflphone.SFLphone.Instance"); - if (!instanceProxy) + "org.sflphone.SFLphone.Instance", + &error); + if (instanceProxy==NULL) { g_printerr ("Failed to get proxy to Instance\n"); return FALSE; @@ -206,11 +241,12 @@ dbus_connect () g_print ("DBus connected to Instance\n"); - callManagerProxy = dbus_g_proxy_new_for_name (connection, + callManagerProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager", - "org.sflphone.SFLphone.CallManager"); - if (!callManagerProxy) + "org.sflphone.SFLphone.CallManager", + &error); + if (callManagerProxy==NULL) { g_printerr ("Failed to get proxy to CallManagers\n"); return FALSE; @@ -252,10 +288,11 @@ dbus_connect () dbus_g_proxy_connect_signal (callManagerProxy, "volumeChanged", G_CALLBACK(volume_changed_cb), NULL, NULL); - configurationManagerProxy = dbus_g_proxy_new_for_name (connection, + configurationManagerProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager", - "org.sflphone.SFLphone.ConfigurationManager"); + "org.sflphone.SFLphone.ConfigurationManager", + &error); if (!configurationManagerProxy) { g_printerr ("Failed to get proxy to ConfigurationManager\n"); diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c index bf9fbe93d0e6941edffa4ec8c9f19d14502502df..2f7a36f156e6520a97137cae06b0b1c7f952df82 100644 --- a/sflphone-gtk/src/menus.c +++ b/sflphone-gtk/src/menus.c @@ -128,7 +128,7 @@ help_about ( void * foo UNUSED) "artists", artists, "authors", authors, "comments", _("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."), - "copyright", "Copyright © 2004-2008 Savoir-faire Linux Inc.", + "copyright", "Copyright © 2004-2009 Savoir-faire Linux Inc.", "name", PACKAGE, "title", _("About SFLphone"), "version", VERSION, diff --git a/src/Makefile.am b/src/Makefile.am index 90953f1607ffb826cc2fe4279696b3d02f400df9..75fc40c9e8d4e1a01bb35f361c1cbd6aa4d3f02d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,6 +62,8 @@ sflphoned_LDADD = \ @PULSEAUDIO_LIBS@ \ @SAMPLERATE_LIBS@ +#sflphoned_LDFLAGS=-pg + noinst_LTLIBRARIES = libsflphone.la noinst_HEADERS = \ diff --git a/src/audio/alsalayer.cpp b/src/audio/alsalayer.cpp index acd933c9d071b4d82e1a02c7206f07ab069a279d..c72378229e9a7b69f83a5560312ffa7724326414 100644 --- a/src/audio/alsalayer.cpp +++ b/src/audio/alsalayer.cpp @@ -54,7 +54,7 @@ AlsaLayer::~AlsaLayer (void) deviceClosed = true; ringtone_thread_is_running = false; - pthread_join(ringtone_thread, NULL); + //pthread_join(ringtone_thread, NULL); } void @@ -104,7 +104,7 @@ AlsaLayer::openDevice (int indexIn, int indexOut, int sampleRate, int frameSize, _debugAlsa(" : nb channel in=%2d, out=%2d\n", _inChannel, _outChannel); _debugAlsa(" : sample rate=%5d, format=%s\n", _sampleRate, SFLDataFormatString); - ost::MutexLock lock( _mutex ); + //ost::MutexLock lock( _mutex ); /*void **hint; @@ -163,6 +163,7 @@ void* ringtoneThreadEntry( void *ptr ) ( ( AlsaLayer *) ptr) -> playTones(); //sleep(0.1); } + /* pthread_mutex_lock(&mut); while( ((AlsaLayer*)ptr)->_manager->getTelephoneTone() == NULL ) @@ -171,6 +172,7 @@ void* ringtoneThreadEntry( void *ptr ) } ( AlsaLayer *) ptr -> playTones(); pthread_mutex_unlock(&mut);*/ + return 0; } @@ -206,7 +208,7 @@ AlsaLayer::fillHWBuffer( void) bool AlsaLayer::isStreamActive (void) { - ost::MutexLock lock( _mutex ); + //ost::MutexLock lock( _mutex ); return (isPlaybackActive() && isCaptureActive()); } @@ -279,7 +281,7 @@ AlsaLayer::getMic(void *buffer, int toCopy) bool AlsaLayer::isStreamStopped (void) { - ost::MutexLock lock( _mutex ); + //ost::MutexLock lock( _mutex ); return !(isStreamActive()); } @@ -291,20 +293,18 @@ void AlsaLayer::restorePulseAppsVolume( void ){} ///////////////// ALSA PRIVATE FUNCTIONS //////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// - - void AlsaLayer::playTones( void ) { int frames; int maxBytes; - pthread_mutex_lock(&mut); - while(!_manager-> getTelephoneTone() && !_manager->getTelephoneFile()) - { + //pthread_mutex_lock(&mut); + //while(!_manager-> getTelephoneTone() && !_manager->getTelephoneFile()) + //{ _debug("Make the ringtone thread wait\n"); pthread_cond_wait(&cond, &mut); - } + //} //frames = _periodSize ; frames = 940 ; @@ -324,13 +324,13 @@ AlsaLayer::playTones( void ) } // free the temporary data buffer free( out ); out = 0; - pthread_mutex_unlock(&mut); + //pthread_mutex_unlock(&mut); } bool AlsaLayer::isPlaybackActive(void) { - ost::MutexLock guard( _mutex ); + //ost::MutexLock guard( _mutex ); if( _PlaybackHandle ) return (snd_pcm_state(_PlaybackHandle) == SND_PCM_STATE_RUNNING ? true : false); else @@ -339,7 +339,7 @@ AlsaLayer::isPlaybackActive(void) { bool AlsaLayer::isCaptureActive(void) { - ost::MutexLock guard( _mutex ); + //ost::MutexLock guard( _mutex ); if( _CaptureHandle ) return (snd_pcm_state( _CaptureHandle) == SND_PCM_STATE_RUNNING ? true : false); else @@ -452,11 +452,11 @@ bool AlsaLayer::alsa_set_params( snd_pcm_t *pcm_handle, int type, int rate ){ // So the loop could start when the ringtone thread entry function is reached ringtone_thread_is_running = true; - if( pthread_create(&ringtone_thread, NULL, ringtoneThreadEntry, this) != 0 ) + /*if( pthread_create(&ringtone_thread, NULL, ringtoneThreadEntry, this) != 0 ) { _debug("Unable to start the ringtone posix thread\n"); return false; - } + }*/ } snd_pcm_sw_params_free( swparams ); diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp index c2f3ec87673b1d73b58029c8215bd0cfc3a24b43..85ec5fea464f198be3e410b68d8cd130dc562bb9 100644 --- a/src/audio/audiortp.cpp +++ b/src/audio/audiortp.cpp @@ -52,7 +52,7 @@ AudioRtp::~AudioRtp (void) { int AudioRtp::createNewSession (SIPCall *ca) { - ost::MutexLock m(_threadMutex); + //ost::MutexLock m(_threadMutex); // something should stop the thread before... if ( _RTXThread != 0 ) { @@ -66,7 +66,7 @@ AudioRtp::createNewSession (SIPCall *ca) { _RTXThread = new AudioRtpRTX (ca, _symmetric); try { if (_RTXThread->start() != 0) { - _debug("! ARTP Failure: unable to start RTX Thread\n"); + _debug("! ARTP Failure: unable to start RTX Thread\n"); return -1; } } catch(...) { @@ -79,7 +79,7 @@ AudioRtp::createNewSession (SIPCall *ca) { void AudioRtp::closeRtpSession () { - ost::MutexLock m(_threadMutex); + //ost::MutexLock m(_threadMutex); // This will make RTP threads finish. // _debug("Stopping AudioRTP\n"); try { diff --git a/src/audio/pulselayer.cpp b/src/audio/pulselayer.cpp index 98a6cd6aa54fcf9e3a25a0ae50eb1e263a9f53c5..b1e6f6f725ea9c061cbbbcf8c04d811ff181643f 100644 --- a/src/audio/pulselayer.cpp +++ b/src/audio/pulselayer.cpp @@ -89,7 +89,7 @@ PulseLayer::connectPulseAudioServer( void ) } pa_threaded_mainloop_unlock( m ); - serverinfo(); + //serverinfo(); //muteAudioApps(99); _debug("Context creation done\n"); } diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index c6177f35fc920738250824a767cd0f07635b32f2..626aca506c6114558d6a1db42fae6259e55a019b 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -64,20 +64,20 @@ ManagerImpl::ManagerImpl (void) : _hasTriedToRegister(false) , _config() , _currentCallId2() - , _currentCallMutex() + //, _currentCallMutex() , _codecBuilder(NULL) , _audiodriver(NULL) , _dtmfKey(NULL) , _codecDescriptorMap() - , _toneMutex() + //, _toneMutex() , _telephoneTone(NULL) , _audiofile() , _spkr_volume(0) , _mic_volume(0) - , _mutex() + //, _mutex() , _dbus(NULL) , _waitingCall() - , _waitingCallMutex() + //, _waitingCallMutex() , _nbIncomingWaitingCall(0) , _path("") , _exist(0) @@ -86,7 +86,7 @@ ManagerImpl::ManagerImpl (void) , _firewallAddr("") , _hasZeroconf(false) , _callAccountMap() - , _callAccountMapMutex() + //, _callAccountMapMutex() , _accountMap() , _userAgent(NULL) , _userAgentInitlized(false) @@ -203,13 +203,13 @@ void ManagerImpl::terminate() bool ManagerImpl::isCurrentCall(const CallID& callId) { - ost::MutexLock m(_currentCallMutex); + //ost::MutexLock m(_currentCallMutex); return (_currentCallId2 == callId ? true : false); } bool ManagerImpl::hasCurrentCall() { - ost::MutexLock m(_currentCallMutex); + //ost::MutexLock m(_currentCallMutex); _debug("Current call ID = %s\n", _currentCallId2.c_str()); if ( _currentCallId2 != "") { return true; @@ -219,13 +219,13 @@ ManagerImpl::hasCurrentCall() { const CallID& ManagerImpl::getCurrentCallId() { - ost::MutexLock m(_currentCallMutex); + //ost::MutexLock m(_currentCallMutex); return _currentCallId2; } void ManagerImpl::switchCall(const CallID& id ) { - ost::MutexLock m(_currentCallMutex); + //ost::MutexLock m(_currentCallMutex); _currentCallId2 = id; } @@ -295,7 +295,9 @@ ManagerImpl::answerCall(const CallID& id) ManagerImpl::hangupCall(const CallID& id) { stopTone(true); + if (_dbus) _dbus->getCallManager()->callStateChanged(id, "HUNGUP"); + AccountID accountid = getAccountFromCall( id ); if (accountid == AccountNULL) { /** @todo We should tell the GUI that the call doesn't exist, so @@ -305,6 +307,7 @@ ManagerImpl::hangupCall(const CallID& id) } bool returnValue = getAccountLink(accountid)->hangup(id); + _debug("After voip link hungup!\n"); removeCallAccount(id); switchCall(""); @@ -561,20 +564,20 @@ ManagerImpl::playDtmf(char code, bool isTalking) // Multi-thread bool ManagerImpl::incomingCallWaiting() { - ost::MutexLock m(_waitingCallMutex); + //ost::MutexLock m(_waitingCallMutex); return (_nbIncomingWaitingCall > 0) ? true : false; } void ManagerImpl::addWaitingCall(const CallID& id) { - ost::MutexLock m(_waitingCallMutex); + //ost::MutexLock m(_waitingCallMutex); _waitingCall.insert(id); _nbIncomingWaitingCall++; } void ManagerImpl::removeWaitingCall(const CallID& id) { - ost::MutexLock m(_waitingCallMutex); + //ost::MutexLock m(_waitingCallMutex); // should return more than 1 if it erase a call if (_waitingCall.erase(id)) { _nbIncomingWaitingCall--; @@ -583,7 +586,7 @@ ManagerImpl::removeWaitingCall(const CallID& id) { bool ManagerImpl::isWaitingCall(const CallID& id) { - ost::MutexLock m(_waitingCallMutex); + //ost::MutexLock m(_waitingCallMutex); CallIDSet::iterator iter = _waitingCall.find(id); if (iter != _waitingCall.end()) { return false; @@ -735,9 +738,9 @@ ManagerImpl::playATone(Tone::TONEID toneId) { if (!hasToPlayTone) return false; if (_telephoneTone != 0) { - _toneMutex.enterMutex(); + //_toneMutex.enterMutex(); _telephoneTone->setCurrentTone(toneId); - _toneMutex.leaveMutex(); + //_toneMutex.leaveMutex(); AudioLoop* audioloop = getTelephoneTone(); unsigned int nbSampling = audioloop->getSize(); @@ -774,16 +777,16 @@ ManagerImpl::stopTone(bool stopAudio=true) { } - _toneMutex.enterMutex(); + //_toneMutex.enterMutex(); if (_telephoneTone != 0) { _telephoneTone->setCurrentTone(Tone::TONE_NULL); } - _toneMutex.leaveMutex(); + //_toneMutex.leaveMutex(); // for ringing tone.. - _toneMutex.enterMutex(); + //_toneMutex.enterMutex(); _audiofile.stop(); - _toneMutex.leaveMutex(); + //_toneMutex.leaveMutex(); } /** @@ -847,13 +850,13 @@ ManagerImpl::ringtone() int sampleRate = audiolayer->getSampleRate(); AudioCodec* codecForTone = _codecDescriptorMap.getFirstCodecAvailable(); - _toneMutex.enterMutex(); + //_toneMutex.enterMutex(); bool loadFile = _audiofile.loadFile(ringchoice, codecForTone , sampleRate); - _toneMutex.leaveMutex(); + //_toneMutex.leaveMutex(); if (loadFile) { - _toneMutex.enterMutex(); + //_toneMutex.enterMutex(); _audiofile.start(); - _toneMutex.leaveMutex(); + //_toneMutex.leaveMutex(); if(CHECK_INTERFACE( layer, ALSA )){ /*int size = _audiofile.getSize(); SFLDataFormat output[ size ]; @@ -880,7 +883,7 @@ ManagerImpl::ringtone() ManagerImpl::getTelephoneTone() { if(_telephoneTone != 0) { - ost::MutexLock m(_toneMutex); + //ost::MutexLock m(_toneMutex); return _telephoneTone->getCurrentTone(); } else { @@ -891,7 +894,7 @@ ManagerImpl::getTelephoneTone() AudioLoop* ManagerImpl::getTelephoneFile() { - ost::MutexLock m(_toneMutex); + //ost::MutexLock m(_toneMutex); if(_audiofile.isStarted()) { return &_audiofile; } else { @@ -1837,7 +1840,7 @@ ManagerImpl::detachZeroconfEvents(Pattern::Observer& observer) ManagerImpl::getCallStatus(const std::string& sequenceId UNUSED) { if (!_dbus) { return false; } - ost::MutexLock m(_callAccountMapMutex); + //ost::MutexLock m(_callAccountMapMutex); CallAccountMap::iterator iter = _callAccountMap.begin(); TokenList tk; std::string code; @@ -2139,7 +2142,7 @@ ManagerImpl::associateCallToAccount(const CallID& callID, const AccountID& accou { if (getAccountFromCall(callID) == AccountNULL) { // nothing with the same ID if ( accountExists(accountID) ) { // account id exist in AccountMap - ost::MutexLock m(_callAccountMapMutex); + //ost::MutexLock m(_callAccountMapMutex); _callAccountMap[callID] = accountID; _debug("Associate Call %s with Account %s\n", callID.data(), accountID.data()); return true; @@ -2154,7 +2157,7 @@ ManagerImpl::associateCallToAccount(const CallID& callID, const AccountID& accou AccountID ManagerImpl::getAccountFromCall(const CallID& callID) { - ost::MutexLock m(_callAccountMapMutex); + //ost::MutexLock m(_callAccountMapMutex); CallAccountMap::iterator iter = _callAccountMap.find(callID); if ( iter == _callAccountMap.end()) { return AccountNULL; @@ -2166,7 +2169,7 @@ ManagerImpl::getAccountFromCall(const CallID& callID) bool ManagerImpl::removeCallAccount(const CallID& callID) { - ost::MutexLock m(_callAccountMapMutex); + //ost::MutexLock m(_callAccountMapMutex); if ( _callAccountMap.erase(callID) ) { return true; } diff --git a/src/managerimpl.h b/src/managerimpl.h index a76987d758b48188f60e853759be06a51d5b75de..b13fc911a88d79580e739ac8ea8b5439d5ad7424 100644 --- a/src/managerimpl.h +++ b/src/managerimpl.h @@ -868,7 +868,7 @@ class ManagerImpl { CallID _currentCallId2; /** Protected current call access */ - ost::Mutex _currentCallMutex; + //ost::Mutex _currentCallMutex; /** Vector of CodecDescriptor */ CodecDescriptor* _codecBuilder; @@ -886,7 +886,7 @@ class ManagerImpl { ///////////////////// // Protected by Mutex ///////////////////// - ost::Mutex _toneMutex; + //ost::Mutex _toneMutex; TelephoneTone* _telephoneTone; AudioFile _audiofile; @@ -899,7 +899,7 @@ class ManagerImpl { // Multithread variable (protected by _mutex) // /** Mutex to protect access to code section */ - ost::Mutex _mutex; + //ost::Mutex _mutex; // Multithread variable (non protected) DBusManagerImpl * _dbus; @@ -908,7 +908,7 @@ class ManagerImpl { CallIDSet _waitingCall; /** Protect waiting call list, access by many voip/audio threads */ - ost::Mutex _waitingCallMutex; + //ost::Mutex _waitingCallMutex; /** Number of waiting call, synchronize with waitingcall callidvector */ unsigned int _nbIncomingWaitingCall; @@ -956,7 +956,7 @@ class ManagerImpl { CallAccountMap _callAccountMap; /** Mutex to lock the call account map (main thread + voiplink thread) */ - ost::Mutex _callAccountMapMutex; + //ost::Mutex _callAccountMapMutex; /** Associate a new CallID to a AccountID * Protected by mutex diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp index d70e1221216de4257fe15373b637d39446152286..c71fd1da9eb1392f4074c80f29d88a3c6ea40327 100644 --- a/src/sipvoiplink.cpp +++ b/src/sipvoiplink.cpp @@ -81,7 +81,7 @@ void SIPVoIPLink::terminateSIPCall() { - ost::MutexLock m(_callMapMutex); + //ost::MutexLock m(_callMapMutex); CallMap::iterator iter = _callMap.begin(); SIPCall *call; while( iter != _callMap.end() ) { @@ -219,18 +219,21 @@ SIPVoIPLink::answer(const CallID& id) bool SIPVoIPLink::hangup(const CallID& id) { - SIPCall* call = getSIPCall(id); - if (call==0) { _debug("! SIP Error: Call doesn't exist\n"); return false; } + SIPCall* call = getSIPCall(id); + if (call==0) { _debug("! SIP Error: Call doesn't exist\n"); return false; } - Manager::instance().getUserAgent()->hangup(call); + if(!Manager::instance().getUserAgent()->hangup(call)) + return false; - // Release RTP thread - if (Manager::instance().isCurrentCall(id)) { - _debug("* SIP Info: Stopping AudioRTP for hangup\n"); - _audiortp->closeRtpSession(); - } - removeCall(id); - return true; + // Release RTP thread + if (Manager::instance().isCurrentCall(id)) { + _debug("* SIP Info: Stopping AudioRTP for hangup\n"); + _audiortp->closeRtpSession(); + } + + removeCall(id); + + return true; } bool diff --git a/src/useragent.cpp b/src/useragent.cpp index fb527784e0a41d0754228debb329860589370d0c..6e0e104cec4ada90606d980fbf15212e2870e450 100644 --- a/src/useragent.cpp +++ b/src/useragent.cpp @@ -1195,16 +1195,16 @@ bool UserAgent::hangup(SIPCall* call) { // User hangup current call. Notify peer status = pjsip_inv_end_session(call->getInvSession(), 404, NULL, &tdata); if(status != PJ_SUCCESS) - return false; + return false; _debug("UserAgent: Before send msg!\n"); if(tdata == NULL) - return true; + return true; status = pjsip_inv_send_msg(call->getInvSession(), tdata); if(status != PJ_SUCCESS) - return false; + return false; call->getInvSession()->mod_data[getInstance()->getModId()] = NULL; return true;