diff options
author | Frédéric Danis <frederic.danis@linux.intel.com> | 2011-02-17 18:23:29 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-02-17 11:25:27 -0600 |
commit | afe16ba22a17946374cf5121c7d08e4bcfbd2942 (patch) | |
tree | 4c7a462bc03ddd676039de4acca56655a70cf83f /src/modem.c | |
parent | de02942e77ade9c8fa382bc2f6d54e225850ab6a (diff) | |
download | ofono-afe16ba22a17946374cf5121c7d08e4bcfbd2942.tar.bz2 |
emulator: always create emulators in offline state
this allows to fix problem when atom created in online state
are destroyed when modem goes to offline state
Diffstat (limited to 'src/modem.c')
-rw-r--r-- | src/modem.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modem.c b/src/modem.c index 8567cac4..bf8b0c08 100644 --- a/src/modem.c +++ b/src/modem.c @@ -189,6 +189,20 @@ struct ofono_atom *__ofono_modem_add_atom(struct ofono_modem *modem, return atom; } +struct ofono_atom *__ofono_modem_add_atom_offline(struct ofono_modem *modem, + enum ofono_atom_type type, + void (*destruct)(struct ofono_atom *), + void *data) +{ + struct ofono_atom *atom; + + atom = __ofono_modem_add_atom(modem, type, destruct, data); + + atom->modem_state = MODEM_STATE_OFFLINE; + + return atom; +} + void *__ofono_atom_get_data(struct ofono_atom *atom) { return atom->data; |