cli,libmm-glib: set default timeout on manager DBus proxy
This patch fixes mmcli to set the default timeout on the manager proxy interface (MmGdbusOrgFreedesktopModemManager1) instead of MMManager itself. The later is not a GDBusProxy object.
This commit is contained in:
committed by
Aleksander Morgado
parent
a448eabb3d
commit
60405ce4ff
+2
-2
@@ -249,7 +249,7 @@ get_manager_ready (GObject *source,
|
||||
ctx->manager = mmcli_get_manager_finish (result);
|
||||
|
||||
/* Setup operation timeout */
|
||||
mmcli_force_operation_timeout (G_DBUS_PROXY (ctx->manager));
|
||||
mmcli_force_operation_timeout (mm_manager_get_proxy (ctx->manager));
|
||||
|
||||
/* Request to set log level? */
|
||||
if (set_logging_str) {
|
||||
@@ -331,7 +331,7 @@ mmcli_manager_run_synchronous (GDBusConnection *connection)
|
||||
ctx->manager = mmcli_get_manager_sync (connection);
|
||||
|
||||
/* Setup operation timeout */
|
||||
mmcli_force_operation_timeout (G_DBUS_PROXY (ctx->manager));
|
||||
mmcli_force_operation_timeout (mm_manager_get_proxy (ctx->manager));
|
||||
|
||||
/* Request to set log level? */
|
||||
if (set_logging_str) {
|
||||
|
||||
@@ -131,6 +131,20 @@ mm_manager_new_sync (GDBusConnection *connection,
|
||||
return (ret ? MM_MANAGER (ret) : NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* mm_manager_get_proxy:
|
||||
* @manager: A #MMManager.
|
||||
*
|
||||
* Gets the #GDBusProxy interface of the %manager.
|
||||
*
|
||||
* Returns: (transfer none): The #GDBusProxy interface of %manager or %NULL if the interface hasn't been created. Do not free the returned object, it is owned by @manager.
|
||||
*/
|
||||
GDBusProxy *
|
||||
mm_manager_get_proxy (MMManager *manager)
|
||||
{
|
||||
return G_DBUS_PROXY (manager->priv->manager_iface_proxy);
|
||||
}
|
||||
|
||||
static void
|
||||
set_logging_ready (MmGdbusOrgFreedesktopModemManager1 *manager_iface_proxy,
|
||||
GAsyncResult *res,
|
||||
|
||||
@@ -67,6 +67,8 @@ MMManager *mm_manager_new_sync (
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GDBusProxy *mm_manager_get_proxy (MMManager *manager);
|
||||
|
||||
void mm_manager_set_logging (MMManager *manager,
|
||||
const gchar *level,
|
||||
GCancellable *cancellable,
|
||||
|
||||
Reference in New Issue
Block a user