summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 564ccd2)
raw | patch | inline | side by side (parent: 564ccd2)
author | VW <vwan@ti.com> | |
Fri, 15 Mar 2013 23:01:30 +0000 (16:01 -0700) | ||
committer | VW <vwan@ti.com> | |
Fri, 15 Mar 2013 23:01:30 +0000 (16:01 -0700) |
qnx/src/api/MessageQ.c | patch | blob | history | |
qnx/src/ipc3x_dev/ti/syslink/ti-ipc/ti-ipc.c | patch | blob | history |
diff --git a/qnx/src/api/MessageQ.c b/qnx/src/api/MessageQ.c
index 95dd0bbde91e0a1dfb23262b93bee5d0de2e992a..145f74bb875f8aeab069e3f33a8586656a0a68cf 100644 (file)
--- a/qnx/src/api/MessageQ.c
+++ b/qnx/src/api/MessageQ.c
{
Int status = MessageQ_S_SUCCESS;
int ipcFd;
+ int err;
PRINTVERBOSE1("MessageQ_attach: remoteProcId: %d\n", remoteProcId)
ipcFd)
MessageQ_module->ipcFd[remoteProcId] = ipcFd;
/*
- * Connect to the remote endpoint and bind a reserved address as
+ * Connect to the remote endpoint and bind any reserved address as
* local endpoint
*/
Connect(ipcFd, remoteProcId, MESSAGEQ_RPMSG_PORT);
+ err = BindAddr(ipcFd, TIIPC_ADDRANY);
+ if (err < 0) {
+ status = MessageQ_E_FAIL;
+ printf ("MessageQ_attach: bind failed: %d, %s\n",
+ errno, strerror(errno));
+ }
}
}
else {
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ti-ipc/ti-ipc.c b/qnx/src/ipc3x_dev/ti/syslink/ti-ipc/ti-ipc.c
index 2a4da2d5073e2da24573661073ddf5e943f303d1..ab9fa3166bdba8a672db794c1f06e5a525da3eda 100644 (file)
#define TIIPC_DEVICE_NAME "/dev/tiipc"
-#define MESSAGEQ_RPMSG_PORT 61
-#define RPMSG_RESERVED_ADDRESSES 1024
/* structure to hold rpmsg-rpc device information */
typedef struct named_device {
return (errno);
}
- /* TODO: Need to make generic instead of hardcoding the address */
- if (obj->remoteAddr == MESSAGEQ_RPMSG_PORT){
- status = MessageQCopy_send(obj->procId, MultiProc_self(), obj->remoteAddr,
- RPMSG_RESERVED_ADDRESSES, buf, bytes, TRUE);
- }
- else {
- status = MessageQCopy_send(obj->procId, MultiProc_self(), obj->remoteAddr,
+ status = MessageQCopy_send(obj->procId, MultiProc_self(), obj->remoteAddr,
obj->addr, buf, bytes, TRUE);
- }
+
if (status < 0) {
return (EIO);
}