Commit 6031c284 authored by Lubomir Rintel's avatar Lubomir Rintel

service: drop use of API that's gone

The NM 1.2 snapshot just removed it and does the status transitions on
_failure() and _disconnect().
parent cab67be1
......@@ -759,10 +759,9 @@ pppd_watch_cb (GPid pid, gint status, gpointer user_data)
nm_vpn_service_plugin_failure (NM_VPN_SERVICE_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
break;
default:
nm_vpn_service_plugin_disconnect (NM_VPN_SERVICE_PLUGIN (plugin), NULL);
break;
}
nm_vpn_service_plugin_set_state (NM_VPN_SERVICE_PLUGIN (plugin), NM_VPN_SERVICE_STATE_STOPPED);
}
static inline const char *
......@@ -1093,19 +1092,8 @@ service_ppp_state_cb (NMPptpPppService *service,
guint32 ppp_state,
NMPptpPlugin *plugin)
{
NMVpnServiceState plugin_state = nm_vpn_service_plugin_get_state (NM_VPN_SERVICE_PLUGIN (plugin));
switch (ppp_state) {
case NM_PPP_STATUS_DEAD:
case NM_PPP_STATUS_DISCONNECT:
if (plugin_state == NM_VPN_SERVICE_STATE_STARTED)
nm_vpn_service_plugin_disconnect (NM_VPN_SERVICE_PLUGIN (plugin), NULL);
else if (plugin_state == NM_VPN_SERVICE_STATE_STARTING)
nm_vpn_service_plugin_failure (NM_VPN_SERVICE_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
break;
default:
break;
}
if (ppp_state == NM_PPP_STATUS_DEAD || ppp_state == NM_PPP_STATUS_DISCONNECT)
nm_vpn_service_plugin_disconnect (NM_VPN_SERVICE_PLUGIN (plugin), NULL);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment