Commit a2030569 authored by M. Hamza's avatar M. Hamza
Browse files

fix pointer reference in v2xMsgNotifBody in meep-vis

parent db86f746
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -809,10 +809,10 @@ func V2xMsgPublicationPOST(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNoContent)

	// create V2xMsgNotification body to send notifications
	v2xMsgNotiBody(v2xMsgPubReq, msgTypeAndStdOrg)
	v2xMsgNotifBody(v2xMsgPubReq, msgTypeAndStdOrg)
}

func v2xMsgNotiBody(v2xMsgPubReq V2xMsgPublication, msgTypeAndStdOrg *msgTypeAndStdOrgCheck) {
func v2xMsgNotifBody(v2xMsgPubReq V2xMsgPublication, msgTypeAndStdOrg *msgTypeAndStdOrgCheck) {

	var v2xMsgNotification V2xMsgNotification

@@ -829,7 +829,11 @@ func v2xMsgNotiBody(v2xMsgPubReq V2xMsgPublication, msgTypeAndStdOrg *msgTypeAnd
	v2xMsgNotification.MsgContent = v2xMsgPubReq.MsgContent

	for i, subLink := range msgTypeAndStdOrg.subscriptionLinks {
		v2xMsgNotification.Links.Subscription = &subLink
		v2xMsgNotification.Links = &V2xMsgNotificationLinks{
			Subscription: &LinkType{
				Href: subLink.Href,
			},
		}
		notifyUrl := msgTypeAndStdOrg.callBackReferenceArray[i]
		sendV2xMsgNotification(notifyUrl, v2xMsgNotification)
	}