diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-06-17 00:58:08 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-06-17 00:58:08 -0700 |
commit | 67c6a01d466d544a003798413090bd100252684c (patch) | |
tree | f1690ab68cc77d304000da39a24a6189db89734b /src/modem.c | |
parent | 5522df64fac7b57d3d9db2272fc9be97c8815b94 (diff) | |
download | ofono-67c6a01d466d544a003798413090bd100252684c.tar.bz2 |
modem: Add function for setting new driver type
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 de72d633..db62e2d8 100644 --- a/src/modem.c +++ b/src/modem.c @@ -1783,6 +1783,20 @@ void ofono_modem_set_name(struct ofono_modem *modem, const char *name) } } +void ofono_modem_set_driver(struct ofono_modem *modem, const char *type) +{ + DBG("type: %s", type); + + if (modem->driver) + return; + + if (strlen(type) > 16) + return; + + g_free(modem->driver_type); + modem->driver_type = g_strdup(type); +} + struct ofono_modem *ofono_modem_create(const char *name, const char *type) { struct ofono_modem *modem; |