// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
- payloadArr := C.GoBytes(unsafe.Pointer(m.payload),C.int(m.len))
- xActionArr := C.GoBytes(unsafe.Pointer(m.xaction),C.int(RMR_MAX_XACTION_LEN))
+ payloadArr := C.GoBytes(unsafe.Pointer(m.payload), C.int(m.len))
+ xActionArr := C.GoBytes(unsafe.Pointer(m.xaction), C.int(RMR_MAX_XACTION_LEN))
Payload: &payloadArr,
XAction: &xActionArr,
}
meidBuf := make([]byte, RMR_MAX_MEID_LEN)
if meidCstr := C.rmr_get_meid(m, (*C.uchar)(unsafe.Pointer(&meidBuf[0]))); meidCstr != nil {
Payload: &payloadArr,
XAction: &xActionArr,
}
meidBuf := make([]byte, RMR_MAX_MEID_LEN)
if meidCstr := C.rmr_get_meid(m, (*C.uchar)(unsafe.Pointer(&meidBuf[0]))); meidCstr != nil {
func (ctx *Context) getAllocatedCRmrMBuf(logger *logger.Logger, mBuf *MBuf, maxMsgSize int) (cMBuf *C.rmr_mbuf_t) {
var xActionBuf [RMR_MAX_XACTION_LEN]byte
func (ctx *Context) getAllocatedCRmrMBuf(logger *logger.Logger, mBuf *MBuf, maxMsgSize int) (cMBuf *C.rmr_mbuf_t) {
var xActionBuf [RMR_MAX_XACTION_LEN]byte
cMBuf = C.rmr_alloc_msg(ctx.RmrCtx, C.int(maxMsgSize))
cMBuf.mtype = C.int(mBuf.MType)
cMBuf = C.rmr_alloc_msg(ctx.RmrCtx, C.int(maxMsgSize))
cMBuf.mtype = C.int(mBuf.MType)
xActionBuf[i] = '\040' //space
}
// Add padding
copy(meidBuf[:], mBuf.Meid)
xActionBuf[i] = '\040' //space
}
// Add padding
copy(meidBuf[:], mBuf.Meid)
if int(len) != RMR_MAX_MEID_LEN {
ctx.Logger.Errorf(
"#rmrCgoUtils.getAllocatedCRmrMBuf - Failed to copy meid data to allocated RMR message buffer")
if int(len) != RMR_MAX_MEID_LEN {
ctx.Logger.Errorf(
"#rmrCgoUtils.getAllocatedCRmrMBuf - Failed to copy meid data to allocated RMR message buffer")