diff --git a/qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c b/qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c
index 28432a8b8a31aa122bb5976b0512d453bc903e36..8d8806badd07de22ededb47809050e65c927510c 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2014, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -669,7 +669,9 @@ _rpmsg_rpc_create(resmgr_context_t *ctp, io_devctl_t *msg, rpmsg_rpc_ocb_t *ocb)
{
Int status = EOK;
struct rppc_create_instance * cargs =
- (struct rppc_create_instance *)(_DEVCTL_DATA (msg->i));
+ (struct rppc_create_instance *)(_DEVCTL_DATA (msg->i));
+ struct rppc_create_instance * out =
+ (struct rppc_create_instance *) (_DEVCTL_DATA (msg->o));
struct rppc_msg_header * msg_hdr = NULL;
rpmsg_rpc_object * rpc = ocb->rpc;
Char * msg_data = NULL;
@@ -708,7 +710,10 @@ _rpmsg_rpc_create(resmgr_context_t *ctp, io_devctl_t *msg, rpmsg_rpc_ocb_t *ocb)
status = OsalSemaphore_pend(rpmsg_rpc_state.sem, 5000);
if (rpc->created == TRUE) {
msg->o.ret_val = EOK;
- status = (_RESMGR_PTR(ctp, &msg->o, sizeof(msg->o)));
+ /* Use the remote endpoint address to identify this instance */
+ out->id = rpc->remoteAddr;
+ status = (_RESMGR_PTR(ctp, &msg->o, sizeof(msg->o) +
+ sizeof(struct rppc_create_instance)));
}
else if (status < 0) {
GT_0trace(curTrace, GT_4CLASS, "Semaphore pend failed.");