mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: reporting module name when it's already running or already stopped
This commit is contained in:
parent
fbcaf2989f
commit
40ec724ca6
20 changed files with 30 additions and 24 deletions
|
@ -140,7 +140,7 @@ func (w dummyWriter) Write(p []byte) (n int, err error) {
|
|||
|
||||
func (mod *BLERecon) Configure() (err error) {
|
||||
if mod.Running() {
|
||||
return session.ErrAlreadyStarted
|
||||
return session.ErrAlreadyStarted(mod.Name())
|
||||
} else if mod.gattDevice == nil {
|
||||
mod.Debug("initializing device ...")
|
||||
|
||||
|
@ -239,7 +239,7 @@ func (mod *BLERecon) enumAllTheThings(mac string) error {
|
|||
}
|
||||
|
||||
mod.setCurrentDevice(dev)
|
||||
if err := mod.Configure(); err != nil && err != session.ErrAlreadyStarted {
|
||||
if err := mod.Configure(); err != nil && err != session.ErrAlreadyStarted(mod.Name()) {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue