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.
This commit is contained in:

committed by
Aleksander Morgado

parent
2550cb20a9
commit
e75dba639f
@@ -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;
|
||||
|
Reference in New Issue
Block a user