summaryrefslogtreecommitdiffstats
path: root/src/modem.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-09-09 13:38:20 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-09-09 13:38:20 -0500
commit4a60d69e9868f7e0dc1b9056c4e62e4c8c8a3e61 (patch)
tree8c061b2b3c9c035c2b9597de527c04d5617db594 /src/modem.c
parent3bbf9b3e2f90e53239591efefc3052bbef8ff311 (diff)
downloadofono-4a60d69e9868f7e0dc1b9056c4e62e4c8c8a3e61.tar.bz2
modem: Remove unneeded functions
Diffstat (limited to 'src/modem.c')
-rw-r--r--src/modem.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/modem.c b/src/modem.c
index 7266c741..ca2b06ed 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -1133,33 +1133,6 @@ void *ofono_devinfo_get_data(struct ofono_devinfo *info)
return info->driver_data;
}
-/* Clients only need to free *modems
- *
- * Note: this function will never return NULL. It will abort if it
- * can't allocate memory for *modems; thus even an empty list will
- * returns a non-NULL pointer.
- */
-const char **__ofono_modem_get_list()
-{
- GSList *l;
- int i;
- struct ofono_modem *modem;
- const char **modems;
-
- modems = g_new0(const char *, g_slist_length(g_modem_list) + 1);
-
- for (l = g_modem_list, i = 0; l; l = l->next) {
- modem = l->data;
-
- if (modem->driver == NULL)
- continue;
-
- modems[i++] = modem->path;
- }
-
- return modems;
-}
-
static void unregister_property(gpointer data)
{
struct modem_property *property = data;
@@ -1344,22 +1317,6 @@ struct ofono_modem *ofono_modem_create(const char *name, const char *type)
return modem;
}
-static void emit_modems()
-{
- DBusConnection *conn = ofono_dbus_get_connection();
- const char **modems = __ofono_modem_get_list();
-
- if (modems == NULL)
- return;
-
- ofono_dbus_signal_array_property_changed(conn,
- OFONO_MANAGER_PATH,
- OFONO_MANAGER_INTERFACE, "Modems",
- DBUS_TYPE_OBJECT_PATH, &modems);
-
- g_free(modems);
-}
-
static void sim_watch(struct ofono_atom *atom,
enum ofono_atom_watch_condition cond, void *data)
{
@@ -1424,8 +1381,6 @@ int ofono_modem_register(struct ofono_modem *modem)
modem->atom_watches = __ofono_watchlist_new(g_free);
- emit_modems();
-
modem->sim_watch = __ofono_modem_add_atom_watch(modem,
OFONO_ATOM_TYPE_SIM,
sim_watch, modem, NULL);
@@ -1478,8 +1433,6 @@ static void modem_unregister(struct ofono_modem *modem)
modem->properties = NULL;
modem->driver = NULL;
-
- emit_modems();
}
void ofono_modem_remove(struct ofono_modem *modem)