Exemplo n.º 1
0
void __connman_technology_notify_regdom_by_device(struct connman_device *device,
						int result, const char *alpha2)
{
	connman_bool_t regdom_set = FALSE;
	struct connman_technology *technology;
	enum connman_service_type type;
	GSList *tech_drivers;

	type = __connman_device_get_service_type(device);
	technology = technology_find(type);

	if (technology == NULL)
		return;

	if (result < 0) {

		for (tech_drivers = technology->driver_list;
		     tech_drivers != NULL;
		     tech_drivers = g_slist_next(tech_drivers)) {
			struct connman_technology_driver *driver =
				tech_drivers->data;

			if (driver->set_regdom != NULL) {
				driver->set_regdom(technology, alpha2);
				regdom_set = TRUE;
			}

		}

		if (regdom_set == FALSE)
			alpha2 = NULL;
	}

	connman_technology_regdom_notify(technology, alpha2);
}
Exemplo n.º 2
0
void __connman_technology_notify_regdom_by_device(struct connman_device *device,
        int result, const char *alpha2)
{
    struct connman_technology *technology;
    enum connman_service_type type;

    type = __connman_device_get_service_type(device);
    technology = technology_find(type);

    if (technology == NULL)
        return;

    if (result < 0) {
        if (technology->driver != NULL &&
                technology->driver->set_regdom != NULL) {
            technology->driver->set_regdom(technology, alpha2);
            return;
        }

        alpha2 = NULL;
    }

    connman_technology_regdom_notify(technology, alpha2);
}