g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->signals_subscriber_id);
- g_object_unref (proxy->priv->connection);
+ if (proxy->priv->connection != NULL)
+ g_object_unref (proxy->priv->connection);
g_free (proxy->priv->name);
g_free (proxy->priv->name_owner);
g_free (proxy->priv->object_path);
}
else
{
- g_simple_async_result_set_from_error (data->simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (data->simple, error);
g_simple_async_result_complete_in_idle (data->simple);
async_init_data_free (data);
goto out;
failed:
g_warn_if_fail (error != NULL);
- g_simple_async_result_set_from_error (data->simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (data->simple, error);
g_simple_async_result_complete_in_idle (data->simple);
async_init_data_free (data);
}
data->callback,
data->user_data,
NULL);
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
}
*
* Gets the connection @proxy is for.
*
- * Returns: A #GDBusConnection owned by @proxy. Do not free.
+ * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
*
* Since: 2.26
*/
&error);
if (error != NULL)
{
- g_simple_async_result_set_from_error (simple,
- error);
- g_error_free (error);
+ g_simple_async_result_take_error (simple, error);
}
else
{
* @method_name: Name of method to invoke.
* @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
* @flags: Flags from the #GDBusCallFlags enumeration.
- * @timeout_msec: The timeout in milliseconds or -1 to use the proxy default timeout.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning
+ * "infinite") or -1 to use the proxy default timeout.
* @cancellable: A #GCancellable or %NULL.
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't
* care about the result of the method invocation.
* @method_name: Name of method to invoke.
* @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
* @flags: Flags from the #GDBusCallFlags enumeration.
- * @timeout_msec: The timeout in milliseconds or -1 to use the proxy default timeout.
+ * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning
+ * "infinite") or -1 to use the proxy default timeout.
* @cancellable: A #GCancellable or %NULL.
* @error: Return location for error or %NULL.
*