Merge pull request #11 from Meskedal/duplicate_fix
Fixed duplicate entries in nm and utils
This commit is contained in:
commit
03a3b409e2
2 changed files with 0 additions and 32 deletions
|
@ -45,18 +45,6 @@ type NetworkManager interface {
|
|||
// connection["802-11-wireless-security"]["psk"] = password
|
||||
AddAndActivateWirelessConnection(connection map[string]map[string]interface{}, device Device, accessPoint AccessPoint) (ac ActiveConnection, err error)
|
||||
|
||||
// AddAndActivateWirelessConnection adds a new connection profile to the network device it has been
|
||||
// passed. It then activates the connection to the passed access point. The first paramter contains
|
||||
// additional information for the connection (most propably the credentials).
|
||||
// Example contents for connection are:
|
||||
// connection := make(map[string]map[string]interface{})
|
||||
// connection["802-11-wireless"] = make(map[string]interface{})
|
||||
// connection["802-11-wireless"]["security"] = "802-11-wireless-security"
|
||||
// connection["802-11-wireless-security"] = make(map[string]interface{})
|
||||
// connection["802-11-wireless-security"]["key-mgmt"] = "wpa-psk"
|
||||
// connection["802-11-wireless-security"]["psk"] = password
|
||||
AddAndActivateWirelessConnection(connection map[string]map[string]interface{}, device Device, accessPoint AccessPoint) (ac ActiveConnection, err error)
|
||||
|
||||
Subscribe() <-chan *dbus.Signal
|
||||
Unsubscribe()
|
||||
|
||||
|
@ -139,22 +127,6 @@ func (n *networkManager) AddAndActivateWirelessConnection(connection map[string]
|
|||
return
|
||||
}
|
||||
|
||||
func (n *networkManager) AddAndActivateWirelessConnection(connection map[string]map[string]interface{}, d Device, ap AccessPoint) (ac ActiveConnection, err error) {
|
||||
var opath1 dbus.ObjectPath
|
||||
var opath2 dbus.ObjectPath
|
||||
|
||||
err = n.callError2(&opath1, &opath2, NetworkManagerAddAndActivateConnection, connection, d.GetPath(), ap.GetPath())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
ac, err = NewActiveConnection(opath2)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (n *networkManager) Subscribe() <-chan *dbus.Signal {
|
||||
if n.sigChan != nil {
|
||||
return n.sigChan
|
||||
|
|
4
utils.go
4
utils.go
|
@ -38,10 +38,6 @@ func (d *dbusBase) call2(value1 interface{}, value2 interface{}, method string,
|
|||
return d.obj.Call(method, 0, args...).Store(value1, value2)
|
||||
}
|
||||
|
||||
func (d *dbusBase) callError2(value1 interface{}, value2 interface{}, method string, args ...interface{}) error {
|
||||
return d.obj.Call(method, 0, args...).Store(value1, value2)
|
||||
}
|
||||
|
||||
func (d *dbusBase) subscribe(iface, member string) {
|
||||
rule := fmt.Sprintf("type='signal',interface='%s',path='%s',member='%s'",
|
||||
iface, d.obj.Path(), NetworkManagerInterface)
|
||||
|
|
Reference in a new issue