[PATCH 0/5] Remove wispr reference counting
From: Patrik Flykt Hi, Here is a patch set removing reference counting in wispr.c. Turns out that no reference counting is needed since all asynchronous calls can be cancelled. Patch 01 cleans up reference counting related to g_web and patch 02 does the same for the Agent API calls. When this is done, the wispr portal context reference count is always 1 and the service usage reset doesn't need a specific function anymore. The function is removed in patch 03. Since wispr_portal_context_ref() isn't used anymore either, it is removed in patch 04. Finally all calls to wispr_portal_context_unref() can be converted to free_connman_wispr_portal_context() in patch 05, as the reference count is always 1 and any unref encountered would remove the structure. This patch set needs the functionality present in the previous "Fixes for various wispr issues" patch set. Please review, Patrik Patrik Flykt (5): wispr: Clean up reference counting wispr: Agent calls need not be referenced wispr: Remove service usage reset function wispr: Remove wispr_portal_context_ref() function wispr: Free wispr portal context struct instead of unreferencing it src/wispr.c | 123 --- 1 file changed, 16 insertions(+), 107 deletions(-) -- 1.7.10.4 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH 0/5] Remove wispr reference counting
HI Patrik, * patrik.fl...@linux.intel.com [2012-09-07 15:00:33 +0300]: > From: Patrik Flykt > > Hi, > > Here is a patch set removing reference counting in wispr.c. Turns out > that no reference counting is needed since all asynchronous calls can be > cancelled. > > Patch 01 cleans up reference counting related to g_web and patch 02 does the > same for the Agent API calls. When this is done, the wispr portal context > reference count is always 1 and the service usage reset doesn't need a > specific function anymore. The function is removed in patch 03. Since > wispr_portal_context_ref() isn't used anymore either, it is removed in > patch 04. Finally all calls to wispr_portal_context_unref() can be converted > to free_connman_wispr_portal_context() in patch 05, as the reference count is > always 1 and any unref encountered would remove the structure. > > This patch set needs the functionality present in the previous "Fixes for > various wispr issues" patch set. This patch set fixes the crash I had in the gresolv.c, the failure was related to the refcounting code in the wisprc code. (http://pastebin.com/5wKtKGEg) Gustavo ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: [PATCH 0/5] Remove wispr reference counting
On Thu, 2012-09-20 at 23:01 -0300, Gustavo Padovan wrote: > > This patch set fixes the crash I had in the gresolv.c, the failure was > related to the refcounting code in the wisprc code. > (http://pastebin.com/5wKtKGEg) Nice to know that it works, thanks for testing this. I got some comments from Tomasz on this one, need to look slightly more into the return FALSE I added in the first set (memory leak or such). Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman