mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 23:20:15 +01:00
Fix some issues in nm-pacrunner-manager.c:
- when adding a configuration through nm_pacrunner_manager_send(), we
kept an association between the interface name and the pacrunner
configuration object path, so that the configuration for that
interface could be removed later. Unfortunately not all
configurations have an interface associated, so we need a more
generic way to identify configurations. Introduce a new @tag
argument that serves as key to match configurations
- the interface name of the last pushed configuration was stored in
the manager private config and reused later; this could cause
issues when there are multiple outstanding D-Bus calls. The
interface is not needed anymore after the previous point.
- remove() didn't actually remove the configuration from the list
(cherry picked from commit 3ad89223d0)
46 lines
2.2 KiB
C
46 lines
2.2 KiB
C
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
/* NetworkManager
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
* (C) Copyright 2016 Atul Anand <atulhjp@gmail.com>.
|
|
*/
|
|
|
|
#ifndef __NETWORKMANAGER_PACRUNNER_MANAGER_H__
|
|
#define __NETWORKMANAGER_PACRUNNER_MANAGER_H__
|
|
|
|
#define NM_TYPE_PACRUNNER_MANAGER (nm_pacrunner_manager_get_type ())
|
|
#define NM_PACRUNNER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_PACRUNNER_MANAGER, NMPacrunnerManager))
|
|
#define NM_PACRUNNER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_PACRUNNER_MANAGER, NMPacrunnerManagerClass))
|
|
#define NM_IS_PACRUNNER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_PACRUNNER_MANAGER))
|
|
#define NM_IS_PACRUNNER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_PACRUNNER_MANAGER))
|
|
#define NM_PACRUNNER_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_PACRUNNER_MANAGER, NMPacrunnerManagerClass))
|
|
|
|
typedef struct _NMPacrunnerManagerClass NMPacrunnerManagerClass;
|
|
|
|
GType nm_pacrunner_manager_get_type (void);
|
|
|
|
NMPacrunnerManager *nm_pacrunner_manager_get (void);
|
|
|
|
void nm_pacrunner_manager_send (NMPacrunnerManager *self,
|
|
const char *iface,
|
|
const char *tag,
|
|
NMProxyConfig *proxy_config,
|
|
NMIP4Config *ip4_config,
|
|
NMIP6Config *ip6_config);
|
|
|
|
void nm_pacrunner_manager_remove (NMPacrunnerManager *self, const char *tag);
|
|
|
|
#endif /* __NETWORKMANAGER_PACRUNNER_MANAGER_H__ */
|