summaryrefslogtreecommitdiffstats
path: root/adapter
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2018-04-05 13:46:54 +0200
committerOndrej Fabry <ofabry@cisco.com>2018-04-05 13:46:54 +0200
commit392a56b700fa6715d091e56c49f79bfe32613fc6 (patch)
tree1fe9cede81628bd6ee4a878296ff5faa22f3c823 /adapter
parent37c71c06371e9bf791fd1573051fa774fcb66602 (diff)
Lookup message name by ID when receiving unexpected message
Change-Id: I693e8084b7e3f036dec5e557dc772857bb7d5f3d Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'adapter')
-rw-r--r--adapter/vppapiclient/vppapiclient_adapter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/adapter/vppapiclient/vppapiclient_adapter.go b/adapter/vppapiclient/vppapiclient_adapter.go
index 10ec53b..e9948e8 100644
--- a/adapter/vppapiclient/vppapiclient_adapter.go
+++ b/adapter/vppapiclient/vppapiclient_adapter.go
@@ -124,7 +124,7 @@ func (a *vppAPIClientAdapter) Disconnect() {
// GetMsgID returns a runtime message ID for the given message name and CRC.
func (a *vppAPIClientAdapter) GetMsgID(msgName string, msgCrc string) (uint16, error) {
- nameAndCrc := C.CString(fmt.Sprintf("%s_%s", msgName, msgCrc))
+ nameAndCrc := C.CString(msgName + "_" + msgCrc)
defer C.free(unsafe.Pointer(nameAndCrc))
msgID := uint16(C.govpp_get_msg_index(nameAndCrc))