summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAngela Stegmaier <angelabaker@ti.com>2015-09-04 10:58:40 -0500
committerAngela Stegmaier <angelabaker@ti.com>2015-10-01 17:30:59 -0500
commitd8e7b6ecb9b97522d58f7e6f5a1662793ed5f9ca (patch)
tree516d24ec34243c77b5590893a67b1a03be5bc1a0 /packages
parentdb38453ffc6eb847f21a7e898723bc4ac6010633 (diff)
downloadipc-d8e7b6ecb9b97522d58f7e6f5a1662793ed5f9ca.tar.gz
Tests: ping_rpmsg: Update Test with Proper Socket Usage
This test was incorrectly using a socket that was connected to a remote endpoint to receive messages on the HOST. The remote core was using the source address to send the response when communicating with an rpmsg-proto channel, which is not a valid use of the rpmsg-proto channel. Only sockets which have been bound to a local endpoint by the application should be used to receive messages. When the remote core sends a message to an endpoint that is associated with a channel, there is a kernel crash because the private data for that endpoint is not as expected. Update the test case to properly use rpmsg-proto. With these updates, the test case now passes and there is no kernel crash. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/ti/ipc/tests/ping_rpmsg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ti/ipc/tests/ping_rpmsg.c b/packages/ti/ipc/tests/ping_rpmsg.c
index b145c13..79aa61e 100644
--- a/packages/ti/ipc/tests/ping_rpmsg.c
+++ b/packages/ti/ipc/tests/ping_rpmsg.c
@@ -67,7 +67,7 @@ static Void pingCallbackFxn(RPMessage_Handle h, UArg arg, Ptr data,
counter++, data, src, len);
/* Send data back to remote endpoint: */
- RPMessage_send(dstProc, src, myEndpoint, (Ptr)reply, replyLen);
+ RPMessage_send(dstProc, arg, myEndpoint, (Ptr)reply, replyLen);
}
Void pingTaskFxn(UArg arg0, UArg arg1)
@@ -75,7 +75,7 @@ Void pingTaskFxn(UArg arg0, UArg arg1)
System_printf("ping_task at port %d: Entered...\n", arg0);
/* Create the messageQ for receiving, and register callback: */
- handle = RPMessage_create(arg0, pingCallbackFxn, NULL, &myEndpoint);
+ handle = RPMessage_create(arg0, pingCallbackFxn, arg0, &myEndpoint);
if (!handle) {
System_abort("RPMessage_createEx failed\n");
}