forked from mooncake-track/Mooncake
[p2pstore] allow topologyMatrix to be empty (#807)
when install tcp transport, nicPriorityMatrix is "". set args[0] to nil so that tcp transport can be installed
This commit is contained in:
parent
e711b6fcc3
commit
3554015b0e
|
|
@ -58,7 +58,11 @@ func (engine *TransferEngine) installTransport(protocol string, topologyMatrix s
|
|||
defer C.free(unsafe.Pointer(protocolCStr))
|
||||
defer C.free(unsafe.Pointer(topologyMatrixCStr))
|
||||
var args [2]unsafe.Pointer
|
||||
args[0] = unsafe.Pointer(topologyMatrixCStr)
|
||||
if len(topologyMatrix) == 0 {
|
||||
args[0] = nil
|
||||
} else {
|
||||
args[0] = unsafe.Pointer(topologyMatrixCStr)
|
||||
}
|
||||
args[1] = nil
|
||||
xport := C.installTransport(engine.engine, protocolCStr, &args[0])
|
||||
if xport == nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue