[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] liblinphone proxy and Linphone-iphone timer pa

From: Eli Burke
Subject: Re: [Linphone-developers] liblinphone proxy and Linphone-iphone timer patches
Date: Wed, 24 Apr 2013 17:08:54 -0400

Dang. It looks like my attachment may have been stripped because it didn't have 
a .txt extension. But that's OK because I accidentally a bit of test code in 
the first one. Here's an updated copy with a txt extension for the mailer 

Attachment: LinphoneTimer.patch.txt
Description: Text document

On Apr 24, 2013, at 4:39 PM, address@hidden wrote:

> Date: Wed, 24 Apr 2013 16:38:53 -0400
> From: Eli Burke <address@hidden>
> Subject: [Linphone-developers] liblinphone proxy and Linphone-iphone
>       timer   patches
> Message-ID: <address@hidden>
> A function in liblinphone called linphone_proxy_config_edit() is responsible 
> for UNREGISTERing a user when account settings change. This entails sending a 
> brand new REGISTRATION to the remote server and setting the expire time to 0. 
> In situations where the user's credentials are invalid, an unnecessary 
> UNREGISTER is sent and can result in the display of an invalid error message. 
>  (for example, if the user enters a bad password and then corrects it). I 
> modified the function so that it would not unregister the user when 
> Registration had failed.
> Making this change in liblinphone revealed a race condition in 
> Linphone-iPhone. It occurs when the user's changed account settings are 
> synchronized. A call to linphone_core_set_sip_transports() ultimately results 
> in a call to eXosip_quit() / eXosip_init() which tears down the network 
> connection and re-initializes it. Meanwhile, the LinphoneManager object is 
> periodically calling a function called linphone_core_iterate(), which 
> eventually calls down to eXosip_event_wait(). 
> If a context switch occurs at the wrong time, the call to eXosip_quit will 
> free up allocated memory, and then eXosip_event_wait will try to use 
> eXosip.j_socketctl_event (now uninitialized) and Linphone goes boom. My fix 
> was to add a methods to stop and start the iterate timer, and to turn it off 
> when the account settings are being synchronized. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]