diff --git a/qnx/src/api/MessageQ.c b/qnx/src/api/MessageQ.c
index 66a9219995041afcd99e630fcbc40381a6686e44..bea345111e264ba1cd629759d09da150e8612b07 100644 (file)
--- a/qnx/src/api/MessageQ.c
+++ b/qnx/src/api/MessageQ.c
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Int status = MessageQ_S_SUCCESS;
MessageQ_Object * obj = NULL;
UInt16 queueIndex = 0u;
- UInt16 procId;
MessageQDrv_CmdArgs cmdArgs;
int fildes[2];
MessageQ_Params ps;
/* Populate the params member */
memcpy(&obj->params, &ps, sizeof(ps));
- procId = MultiProc_self();
obj->queue = cmdArgs.args.create.queueId;
obj->serverHandle = cmdArgs.args.create.handle;
{
MessageQ_Object * obj = (MessageQ_Object *) handle;
char buf = 'n';
- int numBytes;
/* Write to pipe to awaken any threads blocked on this messageQ: */
- numBytes = write(obj->unblockFdW, &buf, 1);
+ write(obj->unblockFdW, &buf, 1);
}
/* Embeds a source message queue into a message. */
PRINTVERBOSE1("transportGet: read from fd: %d\n", fd)
ret = ioctl(fd, TIIPC_IOCGETREMOTE, &remote);
+ if (ret == -1) {
+ printf("ioctl failed: %s (%d)\n", strerror(errno), errno);
+ status = MessageQ_E_FAIL;
+ goto exit;
+ }
PRINTVERBOSE3("\tReceived a msg: byteCount: %d, rpmsg addr: %d, rpmsg \
proc: %d\n", byteCount, remote.remote_addr, remote.remote_proc)
- PRINTVERBOSE2("\tMessage Id: %d, Message size: %d\n", msg->msgId, msg->msgSize)
+ PRINTVERBOSE2("\tMessage Id: %d, Message size: %d\n", msg->msgId,
+ msg->msgSize)
*retMsg = msg;