Hey all,

our sys_arch layer is very conservative at the moment. It basically makes 
Assertions at any given wrong turn.
Also when someone is waiting for sys_arch_mbox_fetch to finish (e.g. 
netconn_accept()), and the mbox is deleted, it fires an Assertion.
This happens now when I want to netconn_close() a connection that is in 
LISTEN and sits on its netconn_accept(). the recvmbox gets deleted.

So in short. Should sys_arch_mbox_fetch() just return "cleanly" when the 
mbox it is waiting for to fill itself is being deleted?

regards,
Fabian

------------------

u32_t sys_arch_mbox_fetch(sys_mbox_t mbox_t, void **msg, u32_t timeout)
        {
        tsSysMbox *mbox = (tsSysMbox *)mbox_t;
        long lStart = (long)OsGetTime();
        unsigned char   bResult;

        if(mbox != (tsSysMbox *)SYS_MBOX_NULL)
                {
                if(!timeout)
                        {
                        bResult = OsSemEnter(mbox->SemFetch);
                        if(!bResult)
                                {//invalid or deleted while waiting on
                                IF_DEBUG_HALT;
                                }
                        }
                else
[....]

where IF_DEBUG_HALT is a define that leads to assert(0);

-------------------------------

void sys_mbox_free(sys_mbox_t mbox_t)
        {
        tsSysMbox *mbox = (tsSysMbox *)mbox_t;

        if(mbox != (tsSysMbox *)SYS_MBOX_NULL)
                {
                if(!mbox->MsgQLevel)
                        {
                        OsSemDelete(mbox->SemPost);
                        OsSemDelete(mbox->SemFetch);
[.....]
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to