Commit 42ea1f82 authored by Laurent THOMAS's avatar Laurent THOMAS

fix F1 setup messages memory error

parent 66e31967
...@@ -925,21 +925,14 @@ void ...@@ -925,21 +925,14 @@ void
sctp_eNB_read_from_socket( sctp_eNB_read_from_socket(
struct sctp_cnx_list_elm_s *sctp_cnx) struct sctp_cnx_list_elm_s *sctp_cnx)
{ {
int flags = 0, n;
socklen_t from_len;
struct sctp_sndrcvinfo sinfo;
struct sockaddr_in addr;
uint8_t buffer[SCTP_RECV_BUFFER_SIZE];
DevAssert(sctp_cnx != NULL); DevAssert(sctp_cnx != NULL);
memset((void *)&addr, 0, sizeof(struct sockaddr_in)); int flags = 0;
from_len = (socklen_t)sizeof(struct sockaddr_in); struct sctp_sndrcvinfo sinfo={0};
memset((void *)&sinfo, 0, sizeof(struct sctp_sndrcvinfo)); uint8_t buffer[SCTP_RECV_BUFFER_SIZE];
n = sctp_recvmsg(sctp_cnx->sd, (void *)buffer, SCTP_RECV_BUFFER_SIZE, int n = sctp_recvmsg(sctp_cnx->sd, (void *)buffer, SCTP_RECV_BUFFER_SIZE,
(struct sockaddr *)&addr, &from_len, NULL, NULL,
&sinfo, &flags); &sinfo, &flags);
if (n < 0) { if (n < 0) {
...@@ -1049,8 +1042,8 @@ sctp_eNB_read_from_socket( ...@@ -1049,8 +1042,8 @@ sctp_eNB_read_from_socket(
sctp_cnx->ppid); sctp_cnx->ppid);
} }
SCTP_DEBUG("[%d][%d] Msg of length %d received from port %u, on stream %d, PPID %d\n", SCTP_DEBUG("[%d][%d] Msg of length %d received, on stream %d, PPID %d\n",
sinfo.sinfo_assoc_id, sctp_cnx->sd, n, ntohs(addr.sin_port), sinfo.sinfo_assoc_id, sctp_cnx->sd, n,
sinfo.sinfo_stream, ntohl(sinfo.sinfo_ppid)); sinfo.sinfo_stream, ntohl(sinfo.sinfo_ppid));
sctp_itti_send_new_message_ind(sctp_cnx->task_id, sctp_itti_send_new_message_ind(sctp_cnx->task_id,
......
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