aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/mmcli-modem.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index 2b7e3569..9c964294 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -901,6 +901,19 @@ state_changed (MMModem *modem,
}
static void
+device_removed (MMManager *manager,
+ MMObject *object)
+{
+ if (object != ctx->object)
+ return;
+
+ g_print ("\t%s: Removed\n", mm_object_get_path (object));
+ fflush (stdout);
+
+ mmcli_async_operation_done ();
+}
+
+static void
get_modem_ready (GObject *source,
GAsyncResult *result,
gpointer none)
@@ -930,6 +943,11 @@ get_modem_ready (GObject *source,
G_CALLBACK (state_changed),
NULL);
+ g_signal_connect (ctx->manager,
+ "object-removed",
+ G_CALLBACK (device_removed),
+ NULL);
+
current = mm_modem_get_state (ctx->modem);
g_print ("\t%s: Initial state, '%s'\n",
mm_object_get_path (ctx->object),