aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2013-01-17 23:11:09 -0800
committerAleksander Morgado <aleksander@lanedo.com>2013-01-18 11:27:51 +0100
commite75dba639febded0e2878a02f47829cedb6239f7 (patch)
tree6b2a027e217599819eac3e8938fadfcc5c75d43d /src/mm-plugin.c
parent2550cb20a9741378c747233ddea8e7a7daa5c198 (diff)
core: add 'hotplugged' flag to indicate if modem is newly plugged in
This patch adds a 'hotplugged' flag to MMBaseModem to indicate if a modem is newly plugged in. A plugin can use this information to determine if, for example, the modem needs to be soft reset using the ATZ command. Dan Williams <dcbw@redhat.com> contributed the idea of implementation.
Diffstat (limited to 'src/mm-plugin.c')
-rw-r--r--src/mm-plugin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
index c7a58b77..b6889ef3 100644
--- a/src/mm-plugin.c
+++ b/src/mm-plugin.c
@@ -802,6 +802,8 @@ mm_plugin_create_modem (MMPlugin *self,
port_probes,
error);
if (modem) {
+ mm_base_modem_set_hotplugged (modem, mm_device_get_hotplugged (device));
+
/* Grab each port */
for (l = port_probes; l; l = g_list_next (l)) {
GError *inner_error = NULL;