My code now stops with the following message.

Asserion p->flags==PBUF_FLAG_RAM || p->flags==PBUF_FLAG_POOL failed at
line 487 in lwip2/src/core/pbuf.c

Now in my code what I do is the following

...
Struct pbuf *data;
Unsigned char *tempBuffer;

        data = pbuf_alloc( PBUF_RAW, PAYLOAD_SIZE, PBUF_ROM);
        tempBuffer = pvMalloc( PAYLOAD_SIZE);
// Allocate my buffer from my memory

Now further in the code I need to fill a buffer from a circular buffer
and if the data does not wrap around I do the following

        data->payload = currentBufferAddress;
        udp_send( outUdp, data);

If the buffer will wrap around I copy the two parts into the temp buffer
allocated at the start 
        memcpy( tempBuffer, curren....
        memcpy( tempBuffer+whatsLeft, ....
        data->payload = tempBuffer;
        udp_send( outUdp, data);

So what is the best way because I don't want to copy the data when I do
not need to.


Best Regards

Julian Gardner

Director / Software Development Manager
RSD Communications Ltd
Unit 2, 8 Borrowmeadow Road
Stirling Scotland FK7 7UW

Tel    +44 [0]1786 450572 Ext 238
Fax    +44 [0]1786 450572
Mob    +44 [0]7836 240907

WWW    http://www.rsdtv.com
EMAIL  [EMAIL PROTECTED]

==========================================

Please do not send me any email messages in HTML format or it may be
deleted at our mail server without notice to sender or recipient.
Message contents should be considered as confidential regardless of the
contents.

 


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to