Code Review
/
ric-plt
/
e2mgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
RIC-997: ErrorIndication handling in e2mgr
[ric-plt/e2mgr.git]
/
E2Manager
/
rmrCgo
/
rmrCgoUtils.go
diff --git
a/E2Manager/rmrCgo/rmrCgoUtils.go
b/E2Manager/rmrCgo/rmrCgoUtils.go
index
f26d168
..
c9d1147
100644
(file)
--- a/
E2Manager/rmrCgo/rmrCgoUtils.go
+++ b/
E2Manager/rmrCgo/rmrCgoUtils.go
@@
-63,6
+63,9
@@
func (ctx *Context) getAllocatedCRmrMBuf(logger *logger.Logger, mBuf *MBuf, maxM
var meidBuf[RMR_MAX_MEID_LEN]byte
cMBuf = C.rmr_alloc_msg(ctx.RmrCtx, C.int(maxMsgSize))
var meidBuf[RMR_MAX_MEID_LEN]byte
cMBuf = C.rmr_alloc_msg(ctx.RmrCtx, C.int(maxMsgSize))
+ if cMBuf == nil {
+ return nil
+ }
cMBuf.mtype = C.int(mBuf.MType)
cMBuf.len = C.int(mBuf.Len)
cMBuf.mtype = C.int(mBuf.MType)
cMBuf.len = C.int(mBuf.Len)
@@
-105,9
+108,9
@@
func (ctx *Context) getAllocatedCRmrMBuf(logger *logger.Logger, mBuf *MBuf, maxM
//TODO: change to assert or return error
func (ctx *Context) checkContextInitialized() {
if ctx.RmrCtx == nil {
//TODO: change to assert or return error
func (ctx *Context) checkContextInitialized() {
if ctx.RmrCtx == nil {
- if ctx.Logger != nil {
+
/*
if ctx.Logger != nil {
ctx.Logger.DPanicf("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized")
ctx.Logger.DPanicf("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized")
- }
+ }
*/
panic("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized. To initialize router please call Init() method")
}
}
panic("#rmrCgoUtils.checkContextInitialized - The RMR router has not been initialized. To initialize router please call Init() method")
}
}