Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NetworkManager-l2tp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
NetworkManager-l2tp
Commits
cbdd0adf
Commit
cbdd0adf
authored
Mar 05, 2012
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes in import error handling
parent
617f2ed0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
import-export.c
properties/import-export.c
+3
-1
nm-l2tp.c
properties/nm-l2tp.c
+3
-0
No files found.
properties/import-export.c
View file @
cbdd0adf
...
...
@@ -177,6 +177,7 @@ do_import (const char *path, GError **error)
case
G_TYPE_UINT
:
int_val
=
g_key_file_get_integer
(
keyfile
,
VPN_SECTION
,
prop
.
name
,
error
);
if
(
int_val
==
0
&&
*
error
){
g_clear_error
(
error
);
g_set_error
(
error
,
L2TP_PLUGIN_UI_ERROR
,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY
,
...
...
@@ -190,9 +191,10 @@ do_import (const char *path, GError **error)
break
;
case
G_TYPE_BOOLEAN
:
bool_val
=
g_key_file_get_boolean
(
keyfile
,
VPN_SECTION
,
prop
.
name
,
error
);
if
(
!
bool_val
&&
!
(
*
error
))
if
(
!
bool_val
&&
!
(
*
error
))
/* If boolean value is FALSE */
continue
;
if
(
!
bool_val
)
{
g_clear_error
(
error
);
g_set_error
(
error
,
L2TP_PLUGIN_UI_ERROR
,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY
,
...
...
properties/nm-l2tp.c
View file @
cbdd0adf
...
...
@@ -752,6 +752,9 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error)
connection
=
do_import
(
path
,
error
);
if
((
connection
==
NULL
)
&&
(
*
error
!=
NULL
))
g_warning
(
_
(
"Can't import file as L2TP config: %s"
),
(
*
error
)
->
message
);
return
connection
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment