From: Mohamed Abukar Date: Mon, 14 Oct 2019 17:01:27 +0000 (+0300) Subject: Remove the unnecessary log X-Git-Tag: v0.0.18^0 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=6f0b3180de2528924b801855c5a7b29b013ad561;hp=f0ee2c6552c6ea705c6c015e2a4e263532a4ce44;p=ric-plt%2Fxapp-frame.git Remove the unnecessary log Change-Id: I2fe30c58125f178a99883bfb3a8069c5a2106977 Signed-off-by: Mohamed Abukar --- diff --git a/pkg/xapp/rmr.go b/pkg/xapp/rmr.go index 9077792..c7b0ff4 100755 --- a/pkg/xapp/rmr.go +++ b/pkg/xapp/rmr.go @@ -170,7 +170,6 @@ func (m *RMRClient) Allocate() *C.rmr_mbuf_t { func (m *RMRClient) Free(mbuf *C.rmr_mbuf_t) { if mbuf == nil { - Logger.Error("rmrClient: Can't free mbuffer, given nil pointer") return } C.rmr_free_msg(mbuf) @@ -185,10 +184,10 @@ func (m *RMRClient) SendRts(params *RMRParams) bool { } func (m *RMRClient) SendBuffer(params *RMRParams, isRts bool) bool { - defer m.Free(params.Mbuf) for i := 0; i < 10; i++ { errCode := m.Send(params, isRts) if errCode == C.RMR_OK { + m.Free(params.Mbuf) m.UpdateStatCounter("Transmitted") return true } @@ -198,6 +197,8 @@ func (m *RMRClient) SendBuffer(params *RMRParams, isRts bool) bool { } } + + m.Free(params.Mbuf) m.UpdateStatCounter("TransmitError") return false }