index 4f609b34092e6e440dbe3b597782c3b657cac1f3..08f2de9cd2e124177bf7fb3a5c1af560a1754a9c 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2019, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#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"
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;
Task_Params_init(params);
- memcpy((Void *)(¶ms->arg0), &taskParams->arg0,
- sizeof(*params) - sizeof(Void *));
+ memcpy((Void *)(params), taskParams,
+ sizeof(*params));
params->instance->name = st->name;
st->reserved = reserved;
return (found);
}
-Bool ServiceMgr_register(String name, RcmServer_Params *rcmServerParams)
+Bool ServiceMgr_register(String name, RcmServer_Params *rcmServerParams)
{
UInt i;
Bool found = FALSE;
/* 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,