aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem.c
diff options
context:
space:
mode:
authorNero <zrxu.zhang@fibocom.com>2024-03-14 21:32:54 +0800
committerAleksander Morgado <aleksander@aleksander.es>2024-04-16 12:14:45 +0200
commit04d826f563a497f2af0557982cdfae7586ca8efb (patch)
tree71991768ce0084e75e668a6e0924eada43813c19 /src/mm-base-modem.c
parent941461a2c5c08b76319a91b1662d2b7ea63d7273 (diff)
dispatcher-modem-setup: new modem setup dispatcher
There are cases where the user wants to configure some actions to be run on a modem before ModemManager takes over full control. The new "modem setup" dispatcher scripts allow running operations in the modem after the port probing has happened and we know which ports are usable in the device. The scripts may e.g. change device configuration, enable modem logging infrastructure, or any other process that would otherwise conflict with MM's own modem management operations.
Diffstat (limited to 'src/mm-base-modem.c')
-rw-r--r--src/mm-base-modem.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
index 2cb9383d..3ef4905f 100644
--- a/src/mm-base-modem.c
+++ b/src/mm-base-modem.c
@@ -1284,27 +1284,6 @@ mm_base_modem_get_port (MMBaseModem *self,
return (port ? g_object_ref (port) : NULL);
}
-static void
-initialize_ready (MMBaseModem *self,
- GAsyncResult *res)
-{
- g_autoptr(GError) error = NULL;
-
- if (!mm_base_modem_initialize_finish (self, res, &error)) {
- if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED)) {
- /* FATAL error, won't even be exported in DBus */
- mm_obj_err (self, "fatal error initializing: %s", error->message);
- } else {
- /* non-fatal error */
- mm_obj_warn (self, "error initializing: %s", error->message);
- mm_base_modem_set_valid (self, TRUE);
- }
- } else {
- mm_obj_dbg (self, "modem initialized");
- mm_base_modem_set_valid (self, TRUE);
- }
-}
-
static inline void
log_port (MMBaseModem *self,
MMPort *port,
@@ -1627,11 +1606,6 @@ mm_base_modem_organize_ports (MMBaseModem *self,
}
#endif
- /* As soon as we get the ports organized, we initialize the modem */
- mm_base_modem_initialize (self,
- (GAsyncReadyCallback)initialize_ready,
- NULL);
-
return TRUE;
}