]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - qnx/src/api/MessageQ.c
Renamed log module into IpcLog to reduce chances of name collision
[ipc/ipcdev.git] / qnx / src / api / MessageQ.c
index 95dd0bbde91e0a1dfb23262b93bee5d0de2e992a..8ac43db05353d4722d8295a5dcf00c0a12e46d33 100644 (file)
 #include <_MultiProc.h>
 #include <ti/ipc/MessageQ.h>
 #include <_MessageQ.h>
-#include <_log.h>
+#include <_IpcLog.h>
 #include <ti/syslink/inc/MessageQDrvDefs.h>
 
 #include <sys/select.h>
@@ -722,6 +722,7 @@ Int MessageQ_attach (UInt16 remoteProcId, Ptr sharedAddr)
 {
     Int     status = MessageQ_S_SUCCESS;
     int     ipcFd;
+    int     err;
 
     PRINTVERBOSE1("MessageQ_attach: remoteProcId: %d\n", remoteProcId)
 
@@ -746,10 +747,16 @@ Int MessageQ_attach (UInt16 remoteProcId, Ptr sharedAddr)
                 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 {