diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-25 11:58:29 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-25 11:58:29 +0100 |
commit | 8d4e15c8ed8d612048070df8f89ec14a781217f3 (patch) | |
tree | e553b86716a4c5631e2e2b2009ec69e15a6cf475 | |
parent | 8042528f524c3d6a71aa0242d30dff09451e96ee (diff) |
fixup! mc-tool: port to GVariant API
-rw-r--r-- | util/mc-tool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c index ab473e7d..e6da0b79 100644 --- a/util/mc-tool.c +++ b/util/mc-tool.c @@ -968,7 +968,8 @@ command_get (TpAccount *account) if (parameters == NULL) parameters = tp_account_dup_parameters(account); - if (!g_variant_lookup (parameters, getter->name, "v", &gvariant)) + gvariant = g_variant_lookup_value (parameters, getter->name, NULL); + if (gvariant == NULL) { command.common.ret = 1; fprintf (stderr, "%s %s: param=%s: %s\n", @@ -980,6 +981,7 @@ command_get (TpAccount *account) value = g_variant_print (gvariant, TRUE); puts(value); g_free(value); + g_variant_unref (gvariant); } } |