Skip to content

Commit

Permalink
trivial: Allow calling passim_client_load() multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsie committed Jan 8, 2025
1 parent a48e142 commit 76f3e68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpassim/passim-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ passim_client_proxy_signal_cb(GDBusProxy *proxy,
* @self: a #PassimClient
* @error: (nullable): optional return location for an error
*
* Loads the client from a file on disk.
* Loads properties from the passim daemon.
*
* Returns: %TRUE for success
*
Expand All @@ -214,6 +214,8 @@ passim_client_load(PassimClient *self, GError **error)
g_return_val_if_fail(PASSIM_IS_CLIENT(self), FALSE);
g_return_val_if_fail(error == NULL || *error == NULL, FALSE);

if (priv->proxy != NULL)
return TRUE;
priv->proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
NULL,
Expand Down

0 comments on commit 76f3e68

Please sign in to comment.