-/*
-func (c *NngPush) DistributeAll(policies *[]string) error {
- xapp.Logger.Debug("Invoked: sbi.DistributeAll")
- xapp.Logger.Debug("args: %v", *policies)
- for _, ep := range rtmgr.Eps {
- if ep.IsReady {
- go c.send(ep, policies)
- } else {
- xapp.Logger.Warn("Endpoint " + ep.Uuid + " is not ready")
- }
+//func (c *RmrPush) send_sync(ep *rtmgr.Endpoint, policies *[]string, channel chan EPStatus, call_id int) {
+func (c *RmrPush) send_sync(ep *rtmgr.Endpoint, policies *[]string, call_id int) {
+ xapp.Logger.Debug("Push policy to endpoint: " + ep.Uuid)
+
+ ret := c.send_data(ep, policies, call_id)
+ conn.Lock()
+ rtmgr.RMRConnStatus[ep.Uuid] = ret
+ conn.Unlock()
+ // Handling per connection .. may be updating global map
+
+ //channel <- EPStatus{ep.Uuid, ret}
+
+}
+
+func (c *RmrPush) send_data(ep *rtmgr.Endpoint, policies *[]string, call_id int) bool {
+ xapp.Logger.Debug("Invoked send_data to endpoint: " + ep.Uuid + " call_id: " + strconv.Itoa(call_id))
+ var state int
+ var retstr string
+
+ var policy = []byte{}
+
+ for _, pe := range *policies {
+ b := []byte(pe)
+ for j := 0; j < len(b); j++ {
+ policy = append(policy, b[j])