Re: Removing result callbacks

2010-07-08 Thread Erik Massop
On Thu, July 8, 2010 4:52 pm, Raphaël Bois wrote: > It looks like notifiers management needs a serious review > (maybe i'll have a look at it and will propose a patch when i have some > time to hack on xmms2, if nobody does it meanwhile). Here's a little untested something (if the ml doesn't eat i

Re: Removing result callbacks

2010-07-08 Thread Raphaël Bois
On 07/08/2010 01:29 PM, Erik Massop wrote: On Thu, July 8, 2010 12:32 pm, Anders Waldenborg wrote: On 07/08/2010 10:27 AM, Raphaël Bois wrote: xmmsc_result_notifier_set, a reference to the result is kept internally until after the callback is called. Thus, to get rid of the notifier, you must u

Re: Removing result callbacks

2010-07-08 Thread Erik Massop
On Thu, July 8, 2010 12:32 pm, Anders Waldenborg wrote: > On 07/08/2010 10:27 AM, Raphaël Bois wrote: >> xmmsc_result_notifier_set, a reference to the result is kept internally >> until after the callback is called. Thus, to get rid of the notifier, >> you must unref the result twice if the callbac

Re: Removing result callbacks

2010-07-08 Thread Anders Waldenborg
On 07/08/2010 10:27 AM, Raphaël Bois wrote: xmmsc_result_notifier_set, a reference to the result is kept internally until after the callback is called. Thus, to get rid of the notifier, you must unref the result twice if the callback was not already called Does this really work? Doesn't that m

Re: Removing result callbacks

2010-07-08 Thread Raphaël Bois
Hi, this seems to be the method I was looking for. When browsing through the sources you can see in xmmsc_result_free how the result notifiers are removed as well. You should also be careful about one thing. When you call xmmsc_result_notifier_set, a reference to the result is kept internal

Re: Removing result callbacks

2010-07-06 Thread Uli Franke
On 06/24/2010 07:21 PM, Tilman Sauerbeck wrote: Uli Franke [2010-06-22 20:56]: Hi, given the case a caller sets up an asychronous xmms command with a certain object as user data. While the xmms tries to generate a result, the user data becomes invalid, because an urgent operation needs to free

Re: Removing result callbacks

2010-06-24 Thread Tilman Sauerbeck
Uli Franke [2010-06-22 20:56]: Hi, > given the case a caller sets up an asychronous xmms command with a certain > object as user data. While the xmms tries to generate a result, the user data > becomes invalid, because an urgent operation needs to free the memory or the > object and the result of

Removing result callbacks

2010-06-22 Thread Uli Franke
Hi given the case a caller sets up an asychronous xmms command with a certain object as user data. While the xmms tries to generate a result, the user data becomes invalid, because an urgent operation needs to free the memory or the object and the result of the operation isn't required anymore or