session: SessionModule.ListParam() swap error returns

modules: fix calling functions
This commit is contained in:
Lars Lehtonen 2019-11-25 04:21:13 -08:00
commit 4d74dc77d6
No known key found for this signature in database
GPG key ID: 8137D474EBCB04F2
3 changed files with 3 additions and 3 deletions

View file

@ -92,7 +92,7 @@ func (mod *DHCP6Spoofer) Configure() error {
return err
}
if err, mod.Domains = mod.ListParam("dhcp6.spoof.domains"); err != nil {
if mod.Domains, err = mod.ListParam("dhcp6.spoof.domains"); err != nil {
return err
}

View file

@ -98,7 +98,7 @@ func (mod *DNSSpoofer) Configure() error {
return err
} else if address, err = mod.IPParam("dns.spoof.address"); err != nil {
return err
} else if err, domains = mod.ListParam("dns.spoof.domains"); err != nil {
} else if domains, err = mod.ListParam("dns.spoof.domains"); err != nil {
return err
} else if hostsFile, err = mod.StringParam("dns.spoof.hosts"); err != nil {
return err

View file

@ -152,7 +152,7 @@ func (m *SessionModule) Param(name string) *ModuleParam {
return m.params[name]
}
func (m SessionModule) ListParam(name string) (err error, values []string) {
func (m SessionModule) ListParam(name string) (values []string, err error) {
values = make([]string, 0)
list := ""
if list, err = m.StringParam(name); err != nil {