Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Fixed the parameters for subscribe APIs #38

Merged
merged 1 commit into from
Jul 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sonic_data_client/transl_data_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func (c *TranslClient) StreamRun(q *queue.PriorityQueue, stop chan struct{}, w *
for i,sub := range subscribe.Subscription {
stringPaths[i] = c.path2URI[sub.Path]
}
subSupport,_ := translib.IsSubscribeSupported(stringPaths)
req := translib.IsSubscribeRequest{Paths:stringPaths}
subSupport,_ := translib.IsSubscribeSupported(req)
var onChangeSubsString []string
var onChangeSubsgNMI []*gnmipb.Path
onChangeMap := make(map[string]*gnmipb.Path)
Expand Down Expand Up @@ -303,7 +304,8 @@ func TranslSubscribe(gnmiPaths []*gnmipb.Path, stringPaths []string, pathMap map
defer c.w.Done()
q := queue.NewPriorityQueue(1, false)
var sync_done bool
translib.Subscribe(stringPaths, q, c.channel)
req := translib.SubscribeRequest{Paths:stringPaths, Q:q, Stop:c.channel}
translib.Subscribe(req)
for {
items, err := q.Get(1)
if err != nil {
Expand Down