Re: [PATCH 7/9] core: Protect browse/search/query specs before invoking source operation



On Mon, 2010-07-19 at 10:15 +0200, Juan A. Suarez Romero wrote:
> 
> Yes, and now you're mentioning it, I need to review some doubts that
> come up to my mind regarding this issue. I'll check them before
> pushing.
> 


Seems I did a stupid mistake, because this patch has no sense at all.

What we actually want is to unref the spec *after* user invokes callback
with remaining == 0.

The point is that Grilo framework is not telling plugin "give me another
media", but the other way around: plugin invokes core callback
browse_result_relay_cb telling "here is a new data".

So the right way to automatically unref the spec, is that when the core
callback receives the last callback (remaining==0), instead of unref()
inmediately the spec, it adds a idle that will unref it.

Thus, it will return the control to plugin function caller, and when
this one returns, the idle will be executed (later or earlier, it
doesn't matter).

I'll update the patches with this fix, as long as the others to
privatize spec fields.

	J.A.




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