index 0bab916a2c84e324473435378e37db41bcfdd3a0..ebde75d35278c248160fb8cf64d14ed677a72d68 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2019, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
{
Int status;
- Assert_isTrue(remoteProcId < ti_sdo_utils_MultiProc_numProcessors,
- ti_sdo_ipc_Notify_A_invArgument);
+ /* validate remote processor ID */
+ if ((remoteProcId >= ti_sdo_utils_MultiProc_numProcessors)
+ || (remoteProcId == MultiProc_self())) {
- /* Use the NotifySetup proxy to setup drivers */
+ return (Notify_E_INVALIDARG);
+ }
+
+ /* use the NotifySetup proxy to setup drivers */
status = ti_sdo_ipc_Notify_SetupProxy_attach(remoteProcId, sharedAddr);
return (status);
listener->callback.cbckArg = cbckArg;
eventList = List_Object_get(obj->eventList, strippedEventId);
+ if (eventList == NULL) {
+ Gate_leaveModule(modKey);
+
+ return (Notify_E_RESOURCE);
+ }
/*
* Store whether the list was empty so we know whether to register the
eventList = List_Object_get(obj->eventList, strippedEventId);
+ if ( eventList == NULL) {
+ return (Notify_E_NOTFOUND);
+ }
+
if (List_empty(eventList)) {
return (Notify_E_NOTFOUND);
}
/* Both loopback and the the event itself are enabled */
eventList = List_Object_get(obj->eventList, eventId);
+ /* Check eventList Non Null */
+ Assert_isTrue(eventList != NULL, ti_sdo_ipc_Notify_A_internal);
+ /* Additional check to handle case when Assert is disabled */
+ if(eventList == NULL) {
+ return;
+ }
+
/* Use "NULL" to get the first EventListener on the list */
listener = (ti_sdo_ipc_Notify_EventListener *)List_next(eventList, NULL);
while (listener != NULL) {