[grilo-plugins] lua-factory: One GrlNetWc per lua source
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: One GrlNetWc per lua source
- Date: Sat, 3 Sep 2016 15:43:13 +0000 (UTC)
commit ebd9119589fced895e0b0520a4e966234d5ea8f6
Author: Victor Toso <me victortoso com>
Date: Sat Jul 30 18:57:31 2016 +0200
lua-factory: One GrlNetWc per lua source
Making usage of GrlNetWc property from previous patch.
https://bugzilla.gnome.org/show_bug.cgi?id=769331
src/lua-factory/grl-lua-library.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index 7711bbc..0fd2bd6 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -702,7 +702,7 @@ net_wc_new_with_options (lua_State *L,
{
GrlNetWc *wc;
- wc = grl_net_wc_new ();
+ wc = grl_lua_operations_get_grl_net_wc (L);
if (arg_offset <= lua_gettop (L) && lua_istable (L, arg_offset)) {
/* Set GrlNetWc options */
lua_pushnil (L);
@@ -1227,7 +1227,6 @@ grl_l_fetch (lua_State *L)
grl_net_wc_request_async (wc, urls[i], os->cancellable, grl_util_fetch_done, fo);
}
- g_object_unref (wc);
g_free (urls);
/* Set the state as wating for this async operation */
@@ -1502,7 +1501,6 @@ grl_l_unzip (lua_State *L)
uo->os = os;
grl_net_wc_request_async (wc, url, os->cancellable, grl_util_unzip_done, uo);
- g_object_unref (wc);
grl_lua_operations_set_source_state (L, LUA_SOURCE_WAITING, os);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]