aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-06-26 16:28:20 +0200
committerOndrej Fabry <ofabry@cisco.com>2019-06-27 07:33:14 +0200
commitef471318d66dd2832df4dc929d312f7cd5f7009a (patch)
tree49dda363eaa7ac3102425aba9f13a503b2a04f48 /core
parentda15c397b3dbbba07d159b3af767aa13d443cfd6 (diff)
Improvements for binapi-generator and support VPP 19.04 in statsclient
- RPC service client implementation for dumps requests now streams responses - RPC service generation is now enabled by default - examples now allow setting binapi socket address - input dir flag for binapi-generator will recursively look into dirs to support core/plugins in /usr/share/vpp/api - minor improvements in debug logs - add support for VPP 19.04 for statsclient Change-Id: I0939ee3aa6e9f850d073fc5c87aff4ccc56b0d70 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'core')
-rw-r--r--core/connection.go10
-rw-r--r--core/log.go1
2 files changed, 8 insertions, 3 deletions
diff --git a/core/connection.go b/core/connection.go
index 67c7e1d..02f980a 100644
--- a/core/connection.go
+++ b/core/connection.go
@@ -174,8 +174,7 @@ func (c *Connection) connectVPP() error {
if err := c.vppClient.Connect(); err != nil {
return err
}
-
- log.Debugf("Connected to VPP.")
+ log.Debugf("Connected to VPP")
if err := c.retrieveMessageIDs(); err != nil {
c.vppClient.Disconnect()
@@ -202,7 +201,12 @@ func (c *Connection) Disconnect() {
// disconnectVPP disconnects from VPP in case it is connected.
func (c *Connection) disconnectVPP() {
if atomic.CompareAndSwapUint32(&c.vppConnected, 1, 0) {
- c.vppClient.Disconnect()
+ log.Debug("Disconnecting from VPP..")
+
+ if err := c.vppClient.Disconnect(); err != nil {
+ log.Debugf("Disconnect from VPP failed: %v", err)
+ }
+ log.Debug("Disconnected from VPP")
}
}
diff --git a/core/log.go b/core/log.go
index aaef4cc..035c159 100644
--- a/core/log.go
+++ b/core/log.go
@@ -18,6 +18,7 @@ func init() {
log.Out = os.Stdout
if debug {
log.Level = logger.DebugLevel
+ log.Debugf("debug mode enabled")
}
}