diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h b/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h index 3afd953a925def604b6baea2b33737bb8a7db212..5cd030feb941218b67e744356cb1e94f3005130c 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h +++ b/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h @@ -80,7 +80,7 @@ extern "C" { typedef struct NwGtpv1uStack { NwU32T stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW */ - NwU32T id; + NwPtrT id; NwU32T seq; NwGtpv1uUlpEntityT ulp; NwGtpv1uUdpEntityT udp; diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h b/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h index 7c8efab47882e4907d2cf25d8556b3ebe9ab8a81..7ba8a2934820949b70e1add7aee451d1d74bde52 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h +++ b/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h @@ -120,11 +120,11 @@ typedef enum { * Gtpv2 Stack API information elements definitions *--------------------------------------------------------------------------*/ -typedef NwU32T NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */ +typedef NwPtrT NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */ typedef NwU8T NwGtpv1uMsgTypeT; /**< Gtpv2 Msg Type */ -typedef NwU32T NwGtpv1uTrxnHandleT; /**< Gtpv2 Transaction Handle */ -typedef NwU32T NwGtpv1uUlpTrxnHandleT; /**< Gtpv2 Ulp Transaction Handle */ -typedef NwU32T NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */ +typedef NwPtrT NwGtpv1uTrxnHandleT; /**< Gtpv2 Transaction Handle */ +typedef NwPtrT NwGtpv1uUlpTrxnHandleT; /**< Gtpv2 Ulp Transaction Handle */ +typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */ /** * API information elements between ULP and Stack for diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 54b1dc23f84e663774947742c4632ee9a7516155..6eafb1269f0f83163bfd5f4b0763199b5f33b1b1 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -379,12 +379,12 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap), pTunnelEndPoint); NW_ASSERT(pTunnelEndPoint); - GTPU_DEBUG("Tunnel end-point 0x%x creation successful for teid 0x%x %u(dec)", - (unsigned int)pTunnelEndPoint, teid, teid); + GTPU_DEBUG("Tunnel end-point 0x%p creation successful for teid 0x%x %u(dec)", + pTunnelEndPoint, (unsigned int)teid, (unsigned int)teid); } } else { - *phStackSession = (NwGtpv1uStackSessionHandleT) 0; + *phStackSession = (NwGtpv1uStackSessionHandleT) NULL; rc = NW_GTPV1U_FAILURE; } @@ -687,9 +687,9 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac memset(thiz, 0, sizeof(NwGtpv1uStackT)); if(thiz) { - thiz->id = (NwU32T) thiz; - thiz->stackType = (NwU32T) stackType; - thiz->seq = (NwU16T) ((NwU32T)thiz) ; + thiz->id = (NwPtrT)thiz; + thiz->stackType = stackType; + thiz->seq = (NwU16T) ((NwU32T)thiz) ; // FIXME interesting casts... don't know what this is good for... RB_INIT(&(thiz->outstandingTxSeqNumMap)); RB_INIT(&(thiz->outstandingRxSeqNumMap)); RB_INIT(&(thiz->sessionMap)); @@ -982,8 +982,8 @@ nwGtpv1uProcessTimeout(void *timeoutInfo) #if defined(LOG_GTPU) && LOG_GTPU > 0 NW_ENTER(thiz); #endif - GTPU_DEBUG("Received timeout event from ULP with timeoutInfo %x!\n", - (unsigned int)timeoutInfo); + GTPU_DEBUG("Received timeout event from ULP with timeoutInfo 0x%p!\n", + timeoutInfo); rc = (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->timeoutCallbackFunc) (timeoutInfo);