diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-07-16 09:33:50 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-16 09:33:50 +0200 |
commit | e8f78a580ab93dfe436d5e88aaa65f4d470f017d (patch) | |
tree | 99e1940621f52055ff8625072835746b2b5832de /src/connection.c | |
parent | 6b7fe4f0d4a22e6f880287ac396f5fe13a7432f5 (diff) | |
download | connman-e8f78a580ab93dfe436d5e88aaa65f4d470f017d.tar.gz connman-e8f78a580ab93dfe436d5e88aaa65f4d470f017d.tar.bz2 connman-e8f78a580ab93dfe436d5e88aaa65f4d470f017d.zip |
Delay the update of service list by 2 seconds
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c index 6939e441..7c81c0d2 100644 --- a/src/connection.c +++ b/src/connection.c @@ -656,15 +656,20 @@ static void update_order(void) } } -void __connman_connection_update_gateway(void) +gboolean __connman_connection_update_gateway(void) { struct gateway_data *active_gateway, *default_gateway; + gboolean updated = FALSE; update_order(); active_gateway = find_active_gateway(); default_gateway = find_default_gateway(); - if (active_gateway && active_gateway != default_gateway) + if (active_gateway && active_gateway != default_gateway) { del_route(active_gateway->element, active_gateway->gateway); + updated = TRUE; + } + + return updated; } |