Commit 8faf0814 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in meep-vis and meep-vis-traffic-mgr

parent a40e7dde
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -1720,6 +1720,7 @@ func v2xNotify(v2xMessage []byte, v2xType int32, longitude *float32, latitude *f
		log.Info("v2xNotify: i: ", i)
		log.Info("v2xNotify: sub", sub)

		if sub.FilterCriteria != nil && findMsgTypeId(sub.FilterCriteria.MsgType, msgType) {
			if sub.Links != nil {
				v2xMsgNotification.Links = &V2xMsgNotificationLinks{
					Subscription: sub.Links.Self,
@@ -1731,3 +1732,18 @@ func v2xNotify(v2xMessage []byte, v2xType int32, longitude *float32, latitude *f
			sendV2xMsgNotification(notifyUrl, v2xMsgNotification)
		}
	}
}

func findMsgTypeId(list []MsgType, item MsgType) bool {
	if len(list) == 0 {
		return false
	}

	for _, v := range list {
		if v == item {
			return true
		}
	}

	return false
}
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

import (
	//"encoding/hex"
	"net/url"
	//"errors"

	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"