[PATCH 06/13] service: Check redundant default changed notify

Jukka Rissanen jukka.rissanen at linux.intel.com
Thu Feb 2 04:54:22 PST 2012


Notify default service changed only if we actually changed
the default service.
---
 src/service.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/service.c b/src/service.c
index 51b0ac1..84834c4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4167,7 +4167,12 @@ int __connman_service_clear_error(struct connman_service *service)
 
 int __connman_service_indicate_default(struct connman_service *service)
 {
-	DBG("service %p", service);
+	struct connman_service *current = get_default();
+
+	DBG("service %p default %p", service, current);
+
+	if (current == service)
+		return 0;
 
 	default_changed();
 
-- 
1.7.1




More information about the connman mailing list