mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-28 05:10:32 +01:00
core/team: kill _get_config()
Access priv->config directly instead.
This commit is contained in:
parent
8298a320c3
commit
9ec3cab8bb
1 changed files with 7 additions and 9 deletions
|
|
@ -177,12 +177,6 @@ ensure_teamd_connection(NMDevice *device, GError **error)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
_get_config(NMDeviceTeam *self)
|
||||
{
|
||||
return nm_str_not_empty(NM_DEVICE_TEAM_GET_PRIVATE(self)->config);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
teamd_read_config(NMDeviceTeam *self)
|
||||
{
|
||||
|
|
@ -246,7 +240,10 @@ update_connection(NMDevice *device, NMConnection *connection)
|
|||
priv->tdc = NULL;
|
||||
}
|
||||
|
||||
g_object_set(G_OBJECT(s_team), NM_SETTING_TEAM_CONFIG, _get_config(self), NULL);
|
||||
g_object_set(G_OBJECT(s_team),
|
||||
NM_SETTING_TEAM_CONFIG,
|
||||
nm_str_not_empty(NM_DEVICE_TEAM_GET_PRIVATE(self)->config),
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
@ -999,11 +996,12 @@ create_and_realize(NMDevice *device,
|
|||
static void
|
||||
get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
NMDeviceTeam *self = NM_DEVICE_TEAM(object);
|
||||
NMDeviceTeam *self = NM_DEVICE_TEAM(object);
|
||||
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE(self);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_CONFIG:
|
||||
g_value_set_string(value, _get_config(self));
|
||||
g_value_set_string(value, priv->config);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue