Hello all,

I am using latest lwIP version and freertos port compiled without LWIP_NOASSERT.
I have also defined
#define DEFAULT_ACCEPTMBOX_SIZE                     4
#define DEFAULT_UDP_RECVMBOX_SIZE               4
#define DEFAULT_TCP_RECVMBOX_SIZE                4

I am getting assert on commented line which checks size of allocated queue 
because size is 0.

err_t
sys_mbox_new(sys_mbox_t *mbox, int size)
{
  LWIP_ASSERT("mbox != NULL", mbox != NULL);
  //LWIP_ASSERT("size > 0", size > 0);

  mbox->mbx = xQueueCreate((UBaseType_t)size, sizeof(void *));
  if(mbox->mbx == NULL) {
    SYS_STATS_INC(mbox.err);
    return ERR_MEM;
  }
  SYS_STATS_INC_USED(mbox);
  return ERR_OK;
}

Interesting is that inside xQueueCreate size is correctly 4 as expected. 
Compiler is set to size optimization.

rum
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to