diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-16 23:41:30 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-16 23:42:22 +0200 |
commit | 99ea00d91233ba1d3aac9a36ebd299ac4c6b45c6 (patch) | |
tree | 4bceb2111afe468dafba65d03a179e41ca2ad843 /src | |
parent | 9e3f7729638f7a452f0c4dba5895ac2954c1b3e6 (diff) | |
download | connman-99ea00d91233ba1d3aac9a36ebd299ac4c6b45c6.tar.gz connman-99ea00d91233ba1d3aac9a36ebd299ac4c6b45c6.tar.bz2 connman-99ea00d91233ba1d3aac9a36ebd299ac4c6b45c6.zip |
Add helper for network update
This is cleaner and more readable than going through the
network_set_group() routine.
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c index eed97591..a241d15d 100644 --- a/src/network.c +++ b/src/network.c @@ -1565,6 +1565,27 @@ void connman_network_set_data(struct connman_network *network, void *data) network->driver_data = data; } +void connman_network_update(struct connman_network *network) +{ + switch (network->type) { + case CONNMAN_NETWORK_TYPE_UNKNOWN: + case CONNMAN_NETWORK_TYPE_VENDOR: + return; + case CONNMAN_NETWORK_TYPE_ETHERNET: + case CONNMAN_NETWORK_TYPE_BLUETOOTH_PAN: + case CONNMAN_NETWORK_TYPE_BLUETOOTH_DUN: + case CONNMAN_NETWORK_TYPE_CELLULAR: + case CONNMAN_NETWORK_TYPE_WIFI: + case CONNMAN_NETWORK_TYPE_WIMAX: + break; + } + + if (network->group != NULL) + __connman_service_update_from_network(network); + + return; +} + static gboolean match_driver(struct connman_network *network, struct connman_network_driver *driver) { |