Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
NetworkManager
NetworkManager
Commits
51974196
Commit
51974196
authored
Nov 09, 2014
by
Lubomir Rintel
🥕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: Only escape VPN banner if it's present
If the connection is in ACTIVATING state, the banner is still NULL.
parent
9f5cff0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
clients/cli/connections.c
clients/cli/connections.c
+5
-2
No files found.
clients/cli/connections.c
View file @
51974196
...
...
@@ -1175,7 +1175,8 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc)
NMSettingConnection
*
s_con
;
NMSettingVpn
*
s_vpn
;
NMVpnConnectionState
vpn_state
;
char
*
type_str
,
*
banner_str
,
*
vpn_state_str
;
char
*
type_str
,
*
banner_str
=
NULL
,
*
vpn_state_str
;
const
char
*
banner
;
const
char
*
username
=
NULL
;
char
**
vpn_data_array
=
NULL
;
guint32
items_num
;
...
...
@@ -1208,7 +1209,9 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc)
}
type_str
=
get_vpn_connection_type
(
con
);
banner_str
=
g_strescape
(
nm_vpn_connection_get_banner
(
NM_VPN_CONNECTION
(
acon
)),
""
);
banner
=
nm_vpn_connection_get_banner
(
NM_VPN_CONNECTION
(
acon
));
if
(
banner
)
banner_str
=
g_strescape
(
banner
,
""
);
vpn_state
=
nm_vpn_connection_get_vpn_state
(
NM_VPN_CONNECTION
(
acon
));
vpn_state_str
=
g_strdup_printf
(
"%d - %s"
,
vpn_state
,
vpn_connection_state_to_string
(
vpn_state
));
...
...
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