X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Frestendpoint.go;h=2e64f05162d6f2959af5f3872ad358908818ba12;hb=27bba84fdbebf215a9ebabe3b7e2a31cb579e669;hp=3b4f8f5f6c23506100e4584729ad4cf0b0eaca4f;hpb=5a9e0662f2fd37c01aba11460c211f676135ff0e;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/restendpoint.go b/pkg/control/restendpoint.go index 3b4f8f5..2e64f05 100644 --- a/pkg/control/restendpoint.go +++ b/pkg/control/restendpoint.go @@ -40,7 +40,12 @@ func ConstructEndpointAddresses(clientEndpoint models.SubscriptionParamsClientEn var xAppHTTPEndPoint string var xAppRMREndPoint string - if host == "" || (HTTP_port == 0 && RMR_port == 0) { + if host == "" { + err := fmt.Errorf("ClientEndpoint provided without HOST name") + return "", "", err + } + + if HTTP_port == 0 && RMR_port == 0 { err := fmt.Errorf("ClientEndpoint provided without PORT numbers") return "INVALID_HTTP_ADDRESS:" + host + (string)(*clientEndpoint.HTTPPort), "INVALID_RMR_ADDRESS:" + host + (string)(*clientEndpoint.RMRPort),