]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - packages/ti/srvmgr/ServiceMgr.c
Shared memory cache management
[ipc/ipcdev.git] / packages / ti / srvmgr / ServiceMgr.c
index 4f609b34092e6e440dbe3b597782c3b657cac1f3..b85cf28000d548d19a7ef402c3af4036b2e75eb9 100644 (file)
@@ -48,8 +48,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <ti/ipc/rpmsg/MessageQCopy.h>
-#include <ti/ipc/rpmsg/NameMap.h>
+#include <ti/ipc/rpmsg/RPMessage.h>
 #include "rpmsg_omx.h"
 #include "ServiceMgr.h"
 
@@ -146,7 +145,8 @@ Bool ServiceMgr_registerSrvTask(UInt16 reserved, Task_FuncPtr func,
         if (!serviceTasks[i].taken) {
             st = &serviceTasks[i];
             st->fxn = func;
-            strcpy(st->name, taskParams->instance->name);
+            strncpy(st->name, taskParams->instance->name, MAX_NAMELEN-1);
+            st->name[MAX_NAMELEN-1] = '\0';
 
             /* Deal with the Task_Params to avoid IInstance mismatch */
             params = &st->params;
@@ -165,7 +165,7 @@ Bool ServiceMgr_registerSrvTask(UInt16 reserved, Task_FuncPtr func,
     return (found);
 }
 
-Bool ServiceMgr_register(String name, RcmServer_Params  *rcmServerParams)
+Bool ServiceMgr_register(String name, RcmServer_Params *rcmServerParams)
 {
     UInt              i;
     Bool              found = FALSE;
@@ -207,10 +207,9 @@ Void ServiceMgr_send(Service_Handle srvc, Ptr data, UInt16 len)
     /* Set special rpmsg_omx header so Linux side can strip it off: */
     hdr->type    = OMX_RAW_MSG;
     hdr->len     = len;
-    hdr->flags   = 0;
 
     /* Send it off (and no response expected): */
-    MessageQCopy_send(dstProc, remote, local, data, HDRSIZE+len);
+    RPMessage_send(dstProc, remote, local, data, HDRSIZE+len);
 }
 
 Bool ServiceMgr_registerDisconnectFxn(Service_Handle srvc, Ptr data,