Commit 650c6599 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5992 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent ae639178
...@@ -213,7 +213,10 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -213,7 +213,10 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
*((NwU32T *) msgHdr) = htonl(pMsg->teid); *((NwU32T *) msgHdr) = htonl(pMsg->teid);
msgHdr += 4; msgHdr += 4;
GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d\n", pMsg->teid, pMsg->msgLen); GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n",
pMsg->teid,
pMsg->msgLen,
pMsg->msgBufOffset);
if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) { if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) {
*((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000); *((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
......
...@@ -334,7 +334,7 @@ void *udp_eNB_task(void *args_p) ...@@ -334,7 +334,7 @@ void *udp_eNB_task(void *args_p)
ITTI_MSG_ORIGIN_ID(received_message_p)); ITTI_MSG_ORIGIN_ID(received_message_p));
pthread_mutex_unlock(&udp_socket_list_mutex); pthread_mutex_unlock(&udp_socket_list_mutex);
if (udp_data_req_p->buffer) { if (udp_data_req_p->buffer) {
free(udp_data_req_p->buffer); itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_req_p->buffer);
} }
goto on_error; goto on_error;
} }
...@@ -349,12 +349,14 @@ void *udp_eNB_task(void *args_p) ...@@ -349,12 +349,14 @@ void *udp_eNB_task(void *args_p)
bytes_written = sendto( bytes_written = sendto(
udp_sd, udp_sd,
udp_data_req_p->buffer, &udp_data_req_p->buffer[udp_data_req_p->buffer_offset],
udp_data_req_p->buffer_length, udp_data_req_p->buffer_length,
0, 0,
(struct sockaddr *)&peer_addr, (struct sockaddr *)&peer_addr,
sizeof(struct sockaddr_in)); sizeof(struct sockaddr_in));
itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_req_p->buffer);
if (bytes_written != udp_data_req_p->buffer_length) { if (bytes_written != udp_data_req_p->buffer_length) {
LOG_E(UDP_, "There was an error while writing to socket " LOG_E(UDP_, "There was an error while writing to socket "
"(%d:%s)\n", errno, strerror(errno)); "(%d:%s)\n", errno, strerror(errno));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment