mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 16:58:02 +02:00
Don't half-implement import
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3853 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
ab821805ba
commit
2f3ed37f72
1 changed files with 1 additions and 23 deletions
|
|
@ -46,29 +46,7 @@
|
|||
NMConnection *
|
||||
do_import (const char *path, char **lines, GError **error)
|
||||
{
|
||||
NMConnection *connection = NULL;
|
||||
NMSettingConnection *s_con;
|
||||
NMSettingVPN *s_vpn;
|
||||
NMSettingVPNProperties *s_vpn_props;
|
||||
char *last_dot;
|
||||
|
||||
connection = nm_connection_new ();
|
||||
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
|
||||
nm_connection_add_setting (connection, NM_SETTING (s_con));
|
||||
|
||||
s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ());
|
||||
s_vpn->service_type = g_strdup (NM_DBUS_SERVICE_PPTP);
|
||||
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
|
||||
|
||||
s_vpn_props = NM_SETTING_VPN_PROPERTIES (nm_setting_vpn_properties_new ());
|
||||
nm_connection_add_setting (connection, NM_SETTING (s_vpn_props));
|
||||
|
||||
s_con->id = g_path_get_basename (path);
|
||||
last_dot = strrchr (s_con->id, '.');
|
||||
if (last_dot)
|
||||
*last_dot = '\0';
|
||||
|
||||
return connection;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue