summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c909c37)
raw | patch | inline | side by side (parent: c909c37)
author | Tinku Mannan <tmannan@ti.com> | |
Fri, 21 Nov 2014 19:45:39 +0000 (14:45 -0500) | ||
committer | Tinku Mannan <tmannan@ti.com> | |
Mon, 24 Nov 2014 13:48:44 +0000 (08:48 -0500) |
ti/runtime/netapi/src/netapi.c | [changed mode: 0644->0755] | patch | blob | history |
ti/runtime/netapi/test/net_test_loopback.c | patch | blob | history | |
ti/runtime/netapi/test/nt_bridge.c | patch | blob | history | |
ti/runtime/netapi/utils/netapi_util_rm.c | patch | blob | history |
if (pBase == NULL)
{
+ free(p);
return NULL;
}
if (hplib_shmAddEntry(pBase, sizeof(NETAPI_SHM_T), NETAPI_ENTRY) !=
hplib_OK)
{
+ free(p);
return NULL;
}
hplib_utilOsalCreate();
created SHM area for us already, so just open it */
else
{
- pBase = hplib_shmOpen(HPLIB_SHM_SIZE);
+ pBase = hplib_shmOpen();
if (pBase)
Osal_start(pBase);
}
diff --git a/ti/runtime/netapi/test/net_test_loopback.c b/ti/runtime/netapi/test/net_test_loopback.c
index d88fc9f354f7804ed7baacd327eadc19605e3d3f..7049f46ef8cb9d83bc23f775700803370b512852 100755 (executable)
meta_tx.enetPort = 0;
memcpy(&p_pkt[netTest_MAC_HEADER_LEN+netTest_IP_HEADER_LEN],&p_sa_info_tx->spi,4);
}
- else
- return;
meta_tx.pseudoHdrChecksum =
netTest_utilGetIPv4PsudoChkSum(&p_pkt[meta_tx.ipOffBytes],8+ meta_tx.ploadLen);
index 503a174e6302c105428098374574644b6fc6b6c8..a28f3f27936790e023758319f733db39cf720635 100755 (executable)
for(i=0;i< MAX_PBIT_ENTRIES;i++)
{
- sprintf(temp_str,"pbit_map_%d",i);
+ snprintf(temp_str,TEMP_STR_LEN-1,"pbit_map_%d",i);
CHECK_SET_PARAM2(temp_str,&pConfig->pbitMapF[i][0],&pConfig->pbitMapQ[i][0]);
}
}
index 2a3edc0af0a10be4917884245fa8fe2eb5a12927..0794956bcdf410a3ed8a843602e057c3d4cc5248 100755 (executable)
#include "ti/runtime/netapi/netapi.h"
-
-uint32_t Osal_rm_MallocCounter = 0;
-uint32_t Osal_rm_FreeCounter = 0;
-
-
/* Socket Includes */
#include "sockutils.h"
#include "sockrmmsg.h"
hplib_spinLock_T net_test_rm_lock;
-
-
-void *Osal_rmMalloc (uint32_t num_bytes)
-{
- /* Increment the allocation counter. */
- Osal_rm_MallocCounter++;
-
- /* Allocate memory. */
- return calloc(1, num_bytes);
-}
-
-void Osal_rmFree (void *ptr, uint32_t size)
-{
- /* Increment the free counter. */
- Osal_rm_FreeCounter++;
- free(ptr);
-}
-
-void *Osal_rmCsEnter(void)
-{
- return NULL;
-}
-
-void Osal_rmCsExit(void *CsHandle)
-{
-
-}
-
-void Osal_rmBeginMemAccess(void *ptr, uint32_t size)
-{
- return;
-}
-
-void Osal_rmEndMemAccess(void *ptr, uint32_t size)
-{
- return;
-}
-
-void *Osal_rmTaskBlockCreate(void)
-{
- return(NULL);
-}
-
-void Osal_rmTaskBlock(void *handle)
-{
-
-}
-
-void Osal_rmTaskUnblock(void *handle)
-{
-
-}
-
-void Osal_rmTaskBlockDelete(void *handle)
-{
-
-}
-
-void Osal_rmLog (char *fmt, ... )
-{
- va_list ap;
-
- va_start(ap, fmt);
- vprintf(fmt, ap);
- va_end(ap);
-}
-
-void *Osal_rmMtCsEnter(void *mtSemObj)
-{
- return NULL;
-}
-
-
-void Osal_rmMtCsExit(void *mtSemObj, void *CsHandle)
-{
-
-}
Rm_Packet *transportAlloc(Rm_AppTransportHandle appTransport, uint32_t pktSize, Rm_PacketHandle *pktHandle)
{
Rm_Packet *rm_pkt = NULL;
int32_t result;
- //net_test_rm_lock = hplib_spinLock_UNLOCKED_INITIALIZER;
hplib_mSpinLockInit(&net_test_rm_lock );
/* Initialize the RM Client - RM must be initialized before anything else in the system */