summaryrefslogtreecommitdiff
path: root/src/nm-connectivity.c
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2015-01-13 15:35:10 -0500
committerDan Winship <danw@redhat.com>2015-01-15 10:22:13 -0500
commit0997c4b245ca5638d0d27eee90146dc47c56130d (patch)
tree130217b8dd120c0fcfe44a90852d795a37adfba6 /src/nm-connectivity.c
parent5e182d55777b95886d39068821d1d6fa8298474d (diff)
downloadNetworkManager-0997c4b245ca5638d0d27eee90146dc47c56130d.tar.gz
connectivity: simplify redundant code
Merge the two nm_connectivity_set_online() calls into one, after tweaking NMConnectivity to always update its internal state before alerting callers to the new state.
Diffstat (limited to 'src/nm-connectivity.c')
-rw-r--r--src/nm-connectivity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index 5913fd96c0..cf4552a8d7 100644
--- a/src/nm-connectivity.c
+++ b/src/nm-connectivity.c
@@ -145,10 +145,10 @@ nm_connectivity_check_cb (SoupSession *session, SoupMessage *msg, gpointer user_
}
done:
+ update_state (self, new_state);
+
g_simple_async_result_set_op_res_gssize (simple, new_state);
g_simple_async_result_complete (simple);
-
- update_state (self, new_state);
}
static void