mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 00:50:16 +01:00
libnm-glib: fix up nm_vpn_connection_get_banner()
We need to get current vpn_state in order for nm_vpn_connection_get_banner() to work properly even if vpn_state had not been set before.
This commit is contained in:
parent
fa5465a746
commit
decfaa41ef
1 changed files with 4 additions and 0 deletions
|
|
@ -98,6 +98,10 @@ nm_vpn_connection_get_banner (NMVPNConnection *vpn)
|
|||
g_return_val_if_fail (NM_IS_VPN_CONNECTION (vpn), NULL);
|
||||
|
||||
priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
|
||||
|
||||
/* We need to update vpn_state first in case it's unknown. */
|
||||
nm_vpn_connection_get_vpn_state (vpn);
|
||||
|
||||
if (priv->vpn_state != NM_VPN_CONNECTION_STATE_ACTIVATED)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue