[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Maybe a bug in tcpip_apimsg()
From: |
justin_wu |
Subject: |
[lwip-users] Maybe a bug in tcpip_apimsg() |
Date: |
Wed, 24 Sep 2003 08:51:21 +0800 |
Function should return when tcpip_apimsg() malloc a memp failed, but in the
fact the client task send this apimsg was blocked on the
apimsg->msg.conn->mbox, I think this maybe a bug, so I do a little
modification:
void
tcpip_apimsg(struct api_msg *apimsg)
{
struct tcpip_msg *msg;
msg = memp_mallocp(MEMP_TCPIP_MSG);
if (msg == NULL) {
memp_free(MEMP_API_MSG, apimsg);
sys_mbox_post(apimsg->msg.conn->mbox, NULL); /* Un-block client task
at this time */
return;
}
msg->type = TCPIP_MSG_API;
msg->msg.apimsg = apimsg;
sys_mbox_post(mbox, msg);
}
Regards,
Justin Wu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Maybe a bug in tcpip_apimsg(),
justin_wu <=