RICPLT-2979 SubReq go asn into use

Change-Id: I9a47ff45543fbb87172746449cc463bdf7d37ce8
Signed-off-by: Juha Hyttinen <juha.hyttinen@nokia.com>
diff --git a/pkg/control/registry.go b/pkg/control/registry.go
index 2c5bd8c..0970a3a 100644
--- a/pkg/control/registry.go
+++ b/pkg/control/registry.go
@@ -42,7 +42,7 @@
 }
 
 // Reserves and returns the next free sequence number
-func (r *Registry) ReserveSubscription(endPoint RmrEndpoint, meid *xapp.RMRMeid) (*Subscription, error) {
+func (r *Registry) ReserveSubscription(endPoint *RmrEndpoint, meid *xapp.RMRMeid) (*Subscription, error) {
 	// Check is current SequenceNumber valid
 	// Allocate next SequenceNumber value and retry N times
 	r.mutex.Lock()
@@ -60,7 +60,7 @@
 			subs := &Subscription{
 				Seq:         sequenceNumber,
 				Active:      false,
-				RmrEndpoint: endPoint,
+				RmrEndpoint: *endPoint,
 				Meid:        meid,
 				Trans:       nil,
 			}