Skip to content
Permalink
Browse files

SMSTCPIP: disabled call to sys_mbox_post() from err_tcp() and do_recv…

…() when TCPIP_CORE_LOCKING is used. conn->mbox will no longer be created when TCPIP_CORE_LOCKING is used. Removed unused mbox field from struct api_msg_msg.

Related to a8630bb.
  • Loading branch information...
sp193 committed Feb 16, 2019
1 parent df70a87 commit f16c52da3458237f90903272f54e1382dcc60723
@@ -146,10 +146,12 @@ struct
conn->type = t;
conn->pcb.tcp = NULL;

#if !LWIP_TCPIP_CORE_LOCKING
if ((conn->mbox = sys_mbox_new()) == SYS_MBOX_NULL) {
memp_free(MEMP_NETCONN, conn);
return NULL;
}
#endif
conn->recvmbox = SYS_MBOX_NULL;
conn->acceptmbox = SYS_MBOX_NULL;
conn->sem = SYS_SEM_NULL;
@@ -218,8 +220,10 @@ err_t netconn_delete(struct netconn *conn)
conn->acceptmbox = SYS_MBOX_NULL;
}

#if !LWIP_TCPIP_CORE_LOCKING
sys_mbox_free(conn->mbox);
conn->mbox = SYS_MBOX_NULL;
#endif
if (conn->sem != SYS_SEM_NULL) {
sys_sem_free(conn->sem);
}
@@ -196,7 +196,7 @@ err_tcp(void *arg, err_t err)
sys_mbox_post(conn->recvmbox, NULL);
}
if (conn->mbox != SYS_MBOX_NULL) {
sys_mbox_post(conn->mbox, NULL);
TCPIP_APIMSG_ACK(conn->mbox);
}
if (conn->acceptmbox != SYS_MBOX_NULL) {
/* Register event with callback */
@@ -475,7 +475,7 @@ do_connected(void *arg, struct tcp_pcb *pcb, err_t err)
if (conn->type == NETCONN_TCP && err == ERR_OK) {
setup_tcp(conn);
}
sys_mbox_post(conn->mbox, NULL);
TCPIP_APIMSG_ACK(conn->mbox);
return ERR_OK;
}
#endif
@@ -700,7 +700,7 @@ static void do_recv(struct api_msg_msg *msg)
if (conn->pcb.tcp && conn->type == NETCONN_TCP)
tcp_recved(conn->pcb.tcp, msg->msg.len);
#endif
sys_mbox_post(conn->mbox, NULL);
TCPIP_APIMSG_ACK(conn->mbox);

} /* end do_recv */

@@ -81,7 +81,6 @@ struct api_msg_msg
u16_t len;
unsigned char copy;
} w;
sys_mbox_t mbox;
u16_t len;
} msg;
};

0 comments on commit f16c52d

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.