Skip to content

Commit

Permalink
add empty cred
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 committed Jan 28, 2025
1 parent 5caa966 commit 90e968b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion viamonvifdiscovery/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
var (
Model = viamrtsp.Family.WithModel("onvif")
errNoCamerasFound = errors.New("no cameras found, ensure cameras are working or check credentials")
emptyCred = device.Credentials{}
)

func init() {
Expand Down Expand Up @@ -65,7 +66,7 @@ func newDiscovery(_ context.Context, _ resource.Dependencies,
}
dis := &rtspDiscovery{
Named: conf.ResourceName().AsNamed(),
Credentials: cfg.Credentials,
Credentials: append([]device.Credentials{emptyCred}, cfg.Credentials...),
logger: logger,
}

Expand Down

0 comments on commit 90e968b

Please sign in to comment.