*/
struct connman_network *__iwmx_cm_network_available(
struct wmxsdk *wmxsdk, const char *station_name,
- const char *station_type,
const void *sdk_nspname, size_t sdk_nspname_size,
int strength)
{
DBG("new network %s", station_name);
nw = connman_network_create(station_name,
CONNMAN_NETWORK_TYPE_WIMAX);
+ connman_network_register(nw);
connman_network_set_index(nw, connman_device_get_index(dev));
connman_network_set_name(nw, station_name);
connman_network_set_blob(nw, "WiMAX.NSP.name",
group[3 * cnt + 1] = 0;
connman_network_set_group(nw, station_name);
if (connman_device_add_network(dev, nw) < 0) {
+ connman_network_unregister(nw);
connman_network_unref(nw);
goto error_add;
}
DBG("updating network %s nw %p\n", station_name, nw);
connman_network_set_available(nw, TRUE);
connman_network_set_strength(nw, strength);
- connman_network_set_string(nw, "WiMAX Network Type", station_type);
error_add:
return nw;
}
*/
struct connman_network *iwmx_cm_network_available(
struct wmxsdk *wmxsdk, const char *station_name,
- const char *station_type,
const void *sdk_nspname, size_t sdk_nspname_size,
int strength)
{
struct connman_network *nw;
g_static_mutex_lock(&wmxsdk->network_mutex);
- nw = __iwmx_cm_network_available(wmxsdk, station_name, station_type,
+ nw = __iwmx_cm_network_available(wmxsdk, station_name,
sdk_nspname, sdk_nspname_size,
strength);
g_static_mutex_unlock(&wmxsdk->network_mutex);
}
wmxsdk->nw = connman_network_ref(nw);
wmxsdk->connecting_nw = NULL;
- connman_network_set_method(nw, CONNMAN_IPCONFIG_METHOD_DHCP);
+ connman_network_set_ipv4_method(nw, CONNMAN_IPCONFIG_METHOD_DHCP);
connman_network_set_connected(nw, TRUE);
DBG("connected to network %s\n",
connman_network_get_identifier(nw));
DBG("disconnected from network %s\n",
connman_network_get_identifier(nw));
connman_network_set_connected(nw, FALSE);
+ connman_network_unregister(nw);
connman_network_unref(nw);
wmxsdk->nw = NULL;
} else