Beispiel #1
0
static void server_remove_sessions(struct network_server *ns)
{
	GSList *list;

	for (list = ns->sessions; list; list = list->next) {
		struct network_session *session = list->data;

		if (*session->dev == '\0')
			continue;

		bnep_server_delete(ns->bridge, session->dev, &session->dst);
	}

	g_slist_free_full(ns->sessions, session_free);

	ns->sessions = NULL;
}
Beispiel #2
0
static void pan_device_free(void *data)
{
    struct pan_device *dev = data;

    if (dev->watch > 0) {
        bnep_server_delete(BNEP_BRIDGE, dev->iface, &dev->dst);
        g_source_remove(dev->watch);
    }

    if (dev->io) {
        g_io_channel_shutdown(dev->io, FALSE, NULL);
        g_io_channel_unref(dev->io);
    }

    if (dev->session)
        bnep_free(dev->session);

    g_free(dev);
}