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
Update Rmr Version and Dockerfile
[ric-plt/e2mgr.git]
/
E2Manager
/
services
/
rmrreceiver
/
rmr_receiver.go
diff --git
a/E2Manager/services/rmrreceiver/rmr_receiver.go
b/E2Manager/services/rmrreceiver/rmr_receiver.go
index
60f3330
..
0a8eb8d
100644
(file)
--- a/
E2Manager/services/rmrreceiver/rmr_receiver.go
+++ b/
E2Manager/services/rmrreceiver/rmr_receiver.go
@@
-29,10
+29,10
@@
import (
type RmrReceiver struct {
logger *logger.Logger
nManager *notificationmanager.NotificationManager
type RmrReceiver struct {
logger *logger.Logger
nManager *notificationmanager.NotificationManager
- messenger
*
rmrCgo.RmrMessenger
+ messenger rmrCgo.RmrMessenger
}
}
-func NewRmrReceiver(logger *logger.Logger, messenger
*
rmrCgo.RmrMessenger, nManager *notificationmanager.NotificationManager) *RmrReceiver {
+func NewRmrReceiver(logger *logger.Logger, messenger rmrCgo.RmrMessenger, nManager *notificationmanager.NotificationManager) *RmrReceiver {
return &RmrReceiver{
logger: logger,
nManager: nManager,
return &RmrReceiver{
logger: logger,
nManager: nManager,
@@
-43,14
+43,15
@@
func NewRmrReceiver(logger *logger.Logger, messenger *rmrCgo.RmrMessenger, nMana
func (r *RmrReceiver) ListenAndHandle() {
for {
func (r *RmrReceiver) ListenAndHandle() {
for {
- mbuf, err := (*r.messenger).RecvMsg()
- r.logger.Debugf("#RmrReceiver.ListenAndHandle - Going to handle received message: %#v\n", mbuf)
+ mbuf, err := r.messenger.RecvMsg()
if err != nil {
if err != nil {
- // TODO: error handling?
+ r.logger.Errorf("#RmrReceiver.ListenAndHandle - error: %s", err)
continue
}
continue
}
+ r.logger.Debugf("#RmrReceiver.ListenAndHandle - Going to handle received message: %#v\n", mbuf)
+
// TODO: go routine?
_ = r.nManager.HandleMessage(mbuf)
}
// TODO: go routine?
_ = r.nManager.HandleMessage(mbuf)
}