commit | 9e873bda595f985ec6582d1bd717f114d2fceed6 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 24 13:29:13 2014 -0800 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 24 13:29:13 2014 -0800 |
tree | f340a03cea684c931742122e66443980dbae9f7a | |
parent | bf87566d7fe0f2355cfd1da062671ca7aeded4f4 [diff] [blame] |
Flip before returning ByteBuffer Change-Id: I7350e24f20d5686a8c6c43291d963070fe7da792
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java index e9ba12e..628b9d4 100644 --- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java +++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceEvent.java
@@ -82,7 +82,7 @@ // Assuming mac is unique cluster-wide public static ByteBuffer getDeviceID(final byte[] mac) { - return ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac); + return (ByteBuffer) ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac).flip(); } public byte[] getID() {