Commit ee47d21e authored by Yann Garcia's avatar Yann Garcia
Browse files

Remove check of UE id as an IP address

parent 564a5ce6
Loading
Loading
Loading
Loading
+2 −2
Changes for go-apps/meep-loc-serv/sbi/loc-serv-sbi.go: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ func processActiveScenarioUpdate() {

		}
		if longitude == nil || latitude == nil {
			log.Info("Longitude or Latitude is nil for UE:", name)
			log.Debug("Longitude or Latitude is nil for UE:", name)
			continue
		}
		// Convert user's geographic coordinates to Cartesian coordinates relative to the origin
@@ -461,7 +461,7 @@ func refreshPositions() {
			latitude = &position.Latitude
		}
		if longitude == nil || latitude == nil {
			log.Info("Longitude or Latitude is nil for UE:", name)
			log.Debug("Longitude or Latitude is nil for UE:", name)
			continue
		}
		x, y := geographicToCartesian(latitude, longitude, originLatitude, originLongitude)
+8 −8
Changes for go-apps/meep-loc-serv/server/loc-serv.go: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -641,9 +641,9 @@ func sendReadyConfirmation(appInstanceId string) error {
	}
	return nil
}
func isValidIPAddress(ip string) bool {
	return net.ParseIP(ip) != nil
}
// func isValidIPAddress(ip string) bool {
// 	return net.ParseIP(ip) != nil
// }

// sendTerminationConfirmation sends a termination confirmation message for the given application instance ID
// to indicate that the application is terminating to the App Support API.
@@ -3919,11 +3919,11 @@ func handleUserLocationEventSubscription(w http.ResponseWriter, requestBody map[
			errHandlerProblemDetails(w, "Mandatory Address parameter not present", http.StatusBadRequest)
			return
		}
		if !isValidIPAddress(userSubBody.Address) {
			log.Error("Invalid Address parameter")
			errHandlerProblemDetails(w, "Invalid Address parameter", http.StatusBadRequest)
			return
		}
		// if !isValidIPAddress(userSubBody.Address) {
		// 	log.Error("Invalid Address parameter")
		// 	errHandlerProblemDetails(w, "Invalid Address parameter", http.StatusBadRequest)
		// 	return
		// }
		if userSubBody.SubscriptionType != "UserLocationEventSubscription" {
			log.Error("Mandatory SubscriptionType parameter not present or invalid")
			errHandlerProblemDetails(w, "Mandatory SubscriptionType parameter not present or invalid", http.StatusBadRequest)