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
3a3833ab
Commit
3a3833ab
authored
Feb 08, 2012
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump (for debugging purposes) connection as early as possible + minor fixes
parent
75330f5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
nm-l2tp-service.c
src/nm-l2tp-service.c
+8
-5
No files found.
src/nm-l2tp-service.c
View file @
3a3833ab
...
@@ -486,6 +486,8 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
...
@@ -486,6 +486,8 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
if
(
!
strcmp
(
key
,
NM_SETTING_NAME
))
if
(
!
strcmp
(
key
,
NM_SETTING_NAME
))
return
;
return
;
/* Search property named 'key' in 'valid_properties'/'valid_secrets' array
XXX: use hash? */
for
(
i
=
0
;
info
->
table
[
i
].
name
;
i
++
)
{
for
(
i
=
0
;
info
->
table
[
i
].
name
;
i
++
)
{
ValidProperty
prop
=
info
->
table
[
i
];
ValidProperty
prop
=
info
->
table
[
i
];
long
int
tmp
;
long
int
tmp
;
...
@@ -537,6 +539,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
...
@@ -537,6 +539,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
_
(
"invalid integer property '%s'"
),
_
(
"invalid integer property '%s'"
),
key
);
key
);
break
;
break
;
case
G_TYPE_BOOLEAN
:
case
G_TYPE_BOOLEAN
:
if
(
!
strcmp
(
value
,
"yes"
)
||
!
strcmp
(
value
,
"no"
))
if
(
!
strcmp
(
value
,
"yes"
)
||
!
strcmp
(
value
,
"no"
))
return
;
/* valid */
return
;
/* valid */
...
@@ -1338,6 +1341,9 @@ real_connect (NMVPNPlugin *plugin,
...
@@ -1338,6 +1341,9 @@ real_connect (NMVPNPlugin *plugin,
NMSettingVPN
*
s_vpn
;
NMSettingVPN
*
s_vpn
;
const
char
*
value
;
const
char
*
value
;
if
(
getenv
(
"NM_PPP_DUMP_CONNECTION"
)
||
debug
)
nm_connection_dump
(
connection
);
s_vpn
=
NM_SETTING_VPN
(
nm_connection_get_setting
(
connection
,
NM_TYPE_SETTING_VPN
));
s_vpn
=
NM_SETTING_VPN
(
nm_connection_get_setting
(
connection
,
NM_TYPE_SETTING_VPN
));
g_assert
(
s_vpn
);
g_assert
(
s_vpn
);
...
@@ -1371,9 +1377,6 @@ real_connect (NMVPNPlugin *plugin,
...
@@ -1371,9 +1377,6 @@ real_connect (NMVPNPlugin *plugin,
g_signal_connect
(
G_OBJECT
(
priv
->
service
),
"ppp-state"
,
G_CALLBACK
(
service_ppp_state_cb
),
plugin
);
g_signal_connect
(
G_OBJECT
(
priv
->
service
),
"ppp-state"
,
G_CALLBACK
(
service_ppp_state_cb
),
plugin
);
g_signal_connect
(
G_OBJECT
(
priv
->
service
),
"ip4-config"
,
G_CALLBACK
(
service_ip4_config_cb
),
plugin
);
g_signal_connect
(
G_OBJECT
(
priv
->
service
),
"ip4-config"
,
G_CALLBACK
(
service_ip4_config_cb
),
plugin
);
if
(
getenv
(
"NM_PPP_DUMP_CONNECTION"
)
||
debug
)
nm_connection_dump
(
connection
);
/* Cache the username and password so we can relay the secrets to the pppd
/* Cache the username and password so we can relay the secrets to the pppd
* plugin when it asks for them.
* plugin when it asks for them.
*/
*/
...
@@ -1558,7 +1561,7 @@ main (int argc, char *argv[])
...
@@ -1558,7 +1561,7 @@ main (int argc, char *argv[])
g_option_context_add_main_entries
(
opt_ctx
,
options
,
NULL
);
g_option_context_add_main_entries
(
opt_ctx
,
options
,
NULL
);
g_option_context_set_summary
(
opt_ctx
,
g_option_context_set_summary
(
opt_ctx
,
_
(
"nm-
pp
tp-service provides L2TP VPN capability with optional IPSec support to NetworkManager."
));
_
(
"nm-
l2
tp-service provides L2TP VPN capability with optional IPSec support to NetworkManager."
));
g_option_context_parse
(
opt_ctx
,
&
argc
,
&
argv
,
NULL
);
g_option_context_parse
(
opt_ctx
,
&
argc
,
&
argv
,
NULL
);
g_option_context_free
(
opt_ctx
);
g_option_context_free
(
opt_ctx
);
...
@@ -1567,7 +1570,7 @@ main (int argc, char *argv[])
...
@@ -1567,7 +1570,7 @@ main (int argc, char *argv[])
debug
=
TRUE
;
debug
=
TRUE
;
if
(
debug
)
if
(
debug
)
g_message
(
"nm-
pp
tp-service (version "
DIST_VERSION
") starting..."
);
g_message
(
"nm-
l2
tp-service (version "
DIST_VERSION
") starting..."
);
plugin
=
nm_l2tp_plugin_new
();
plugin
=
nm_l2tp_plugin_new
();
if
(
!
plugin
)
if
(
!
plugin
)
...
...
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