summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/connman.service.in1
-rwxr-xr-xsrc/network.c25
-rwxr-xr-xvpn/connman-vpn.service.in1
3 files changed, 4 insertions, 23 deletions
diff --git a/src/connman.service.in b/src/connman.service.in
index 503ec45..3bc442a 100755
--- a/src/connman.service.in
+++ b/src/connman.service.in
@@ -7,6 +7,7 @@ DefaultDependencies=no
Type=dbus
BusName=net.connman
Restart=on-failure
+SmackProcessLabel=System
ExecStart=@sbindir@/connmand -n --noplugin vpn
StandardOutput=null
CapabilityBoundingSet=~CAP_MAC_ADMIN
diff --git a/src/network.c b/src/network.c
index d20385f..491515f 100755
--- a/src/network.c
+++ b/src/network.c
@@ -847,23 +847,6 @@ static void network_remove(struct connman_network *network)
network->driver = NULL;
}
-static void network_change(struct connman_network *network)
-{
- DBG("network %p name %s", network, network->name);
-
- if (!network->connected)
- return;
-
- connman_device_set_disconnected(network->device, true);
-
- if (network->driver && network->driver->disconnect) {
- network->driver->disconnect(network);
- return;
- }
-
- network->connected = false;
-}
-
static void probe_driver(struct connman_network_driver *driver)
{
GSList *list;
@@ -1470,9 +1453,6 @@ void connman_network_set_error(struct connman_network *network,
{
DBG("network %p error %d", network, error);
- network->connecting = false;
- network->associating = false;
-
switch (error) {
case CONNMAN_NETWORK_ERROR_UNKNOWN:
return;
@@ -1495,7 +1475,7 @@ void connman_network_set_error(struct connman_network *network,
#endif
}
- network_change(network);
+ __connman_network_disconnect(network);
}
/**
@@ -1516,8 +1496,7 @@ int connman_network_set_connected(struct connman_network *network,
!connected) {
connman_network_set_error(network,
CONNMAN_NETWORK_ERROR_CONNECT_FAIL);
- if (__connman_network_disconnect(network) == 0)
- return 0;
+ return 0;
}
if (network->connected == connected)
diff --git a/vpn/connman-vpn.service.in b/vpn/connman-vpn.service.in
index 71abb57..6cc59cb 100755
--- a/vpn/connman-vpn.service.in
+++ b/vpn/connman-vpn.service.in
@@ -6,6 +6,7 @@ After=dbus.socket
[Service]
Type=dbus
BusName=net.connman.vpn
+SmackProcessLabel=System
ExecStart=@sbindir@/connman-vpnd -n
StandardOutput=null
CapabilityBoundingSet=~CAP_MAC_ADMIN