summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-07 11:53:57 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-07-07 11:55:18 -0700
commit471f4192023866e5fa3ff26ba49f33c9acf441b6 (patch)
treef38a2d635ca65920702c4d2915242f8b175bc649
parentcbcec6c878630ed341079d52e44506f6e9c79e8f (diff)
downloadconnman-471f4192023866e5fa3ff26ba49f33c9acf441b6.tar.gz
connman-471f4192023866e5fa3ff26ba49f33c9acf441b6.tar.bz2
connman-471f4192023866e5fa3ff26ba49f33c9acf441b6.zip
Don't update service details if network is already connected
-rw-r--r--src/service.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 9fefac8b..d5116185 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1341,9 +1341,16 @@ static void update_from_network(struct connman_service *service,
struct connman_network *network)
{
connman_uint8_t strength = service->strength;
+ connman_bool_t connected = FALSE;
GSequenceIter *iter;
const char *str;
+ if (service->network != NULL)
+ connected = connman_network_get_connected(service->network);
+
+ if (connected == TRUE)
+ return;
+
str = connman_network_get_string(network, "Name");
if (str != NULL) {
g_free(service->name);