diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-30 21:55:51 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-30 21:55:51 +0100 |
commit | 4167a753ea847d3733a736fc3f5c029662f3131a (patch) | |
tree | 7c77e0f1aac3cf5e3d9d4b3b50ea727460ff1095 /src | |
parent | 42dc3ed17eb90633b0b3a06dd9b1351ee28d73f3 (diff) | |
download | connman-4167a753ea847d3733a736fc3f5c029662f3131a.tar.gz connman-4167a753ea847d3733a736fc3f5c029662f3131a.tar.bz2 connman-4167a753ea847d3733a736fc3f5c029662f3131a.zip |
Add support for storing network specific path value
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c index d2448951..47c203fa 100644 --- a/src/network.c +++ b/src/network.c @@ -31,6 +31,7 @@ struct connman_network { struct connman_element element; enum connman_network_type type; char *identifier; + char *path; struct connman_network_driver *driver; void *driver_data; @@ -193,6 +194,7 @@ static void network_destruct(struct connman_element *element) DBG("element %p name %s", element, element->name); + g_free(network->path); g_free(network->identifier); } @@ -268,6 +270,33 @@ const char *connman_network_get_identifier(struct connman_network *network) return network->identifier; } +/** + * connman_network_set_path: + * @network: network structure + * @path: path name + * + * Set path name of network + */ +void connman_network_set_path(struct connman_network *network, const char *path) +{ + g_free(network->element.devpath); + network->element.devpath = g_strdup(path); + + g_free(network->path); + network->path = g_strdup(path); +} + +/** + * connman_network_get_path: + * @network: network structure + * + * Get path name of network + */ +const char *connman_network_get_path(struct connman_network *network) +{ + return network->path; +} + void __connman_network_set_device(struct connman_network *network, struct connman_device *device) { |