diff options
| author | Michael Biebl <biebl@debian.org> | 2011-03-18 20:17:47 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2011-03-18 20:17:47 +0100 |
| commit | e22c6e05e9ebc6cce941762020c5710b8014677b (patch) | |
| tree | 7e9fd7f8ae24a94b03f683e0cef9a346968e1e8b /src/ppp-manager/nm-ppp-manager.c | |
| parent | a6b89d35fabd9f5934b84d7cde22e9268f92c3d3 (diff) | |
Imported Upstream version 0.8.3.998 upstream/0.8.3.998
Diffstat (limited to 'src/ppp-manager/nm-ppp-manager.c')
| -rw-r--r-- | src/ppp-manager/nm-ppp-manager.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index efa660b0..31a5e57a 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -165,7 +165,8 @@ dispose (GObject *object) nm_ppp_manager_stop (NM_PPP_MANAGER (object)); - g_object_unref (priv->act_req); + if (priv->act_req) + g_object_unref (priv->act_req); g_object_unref (priv->dbus_manager); G_OBJECT_CLASS (nm_ppp_manager_parent_class)->dispose (object); @@ -724,6 +725,8 @@ create_pppd_cmd_line (NMPPPManager *self, NMCmdLine *cmd; const char *ppp_debug; + g_return_val_if_fail (setting != NULL, NULL); + ppp_binary = nm_find_pppd (); if (!ppp_binary) { g_set_error (err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR, @@ -897,6 +900,15 @@ nm_ppp_manager_start (NMPPPManager *manager, priv = NM_PPP_MANAGER_GET_PRIVATE (manager); +#if !WITH_PPP + /* PPP support disabled */ + g_set_error_literal (err, + NM_PPP_MANAGER_ERROR, + NM_PPP_MANAGER_ERROR_UNKOWN, + "PPP support is not enabled."); + return FALSE; +#endif + priv->pid = 0; /* Make sure /dev/ppp exists (bgo #533064) */ |