|Subject:||Re: [lwip-users] Assertion Programmer violates API|
|Date:||Fri, 20 Feb 2015 14:29:49 +0100|
thank you for your quick response. We are using the httpd server delivered with the NIOS port. As I know it is using the raw api as we use directly tcp_write() and these methods instead of the socket or api methods.
Our file structure should be allocated properly as our files are of type “static const unsigned char” and known at compile time.
If we follow the http GET request from the browser with the debugger on the target we can confirm that we prepare our answer.
We first get called in the http_accept(), install there the needed callback functions, next we get called in http_recv, there we decode the “http GET” request and start preparing our response. If we follow with the debugger we can confirm that we go through http_sent->send_data->tcp_write->tcp_pbuf_prealloc->tcp_create_segment
We stepped through the complete tcp_write and could confirm that we chain our html data into a queue on which our pcb is pointing with the payload pointer.
After stepping through the tcp_write we need to leave the debugger to see with wireshark that our device is answering with two packets on the http GET request but there the packets contain the wrong data.
Maybe something goes wrong with the segmentation.
Is there an option to define our data as typ pbuf-ROM? Since the data are not changing this is the most suitable pbuf type?
What means this define LWIP_HTTPD_DYNAMIC_FILE_READ ?
We do not have these define in our project. We just using the lwipopts.h but there we did not made changes I think.
Thank you for your help and best regards,
I assume you are using the httpdserver_raw code?
Verify that the fs_file structure that is prepared in your fs_open_custom() has properly allocated and valid data pointed to by the data member (i.e.: file->data). This data should be permanent, either at a ROM address, or allocated somewhere.
If (fs_file *)file->length is set, but (fs_file *)file->data == NULL, you will get this error.
Are you using LWIP_HTTPD_DYNAMIC_FILE_READ? what options do you have set that affect httpd.c?
On Feb 18, 2015, at 4:44 AM, Dennis Schäfer <address@hidden> wrote:
I am currently working on a project based on the LWIP-Stack (1.4.1).
The goal is to create a working webserver-interface on a NIOS development board.
I am failing for a long time on fixing a problem with the HTTP implementation which causes an assertion
Oberweyerer Straße 21
Phone: +49 6433 9145-DW
Fax: +49 6433 9145-DW
Managing Directors: Michael Weber, Dr. Christoph Loos
This electronic mail and any files transmitted with it may contain information proprietary to Motec GmbH and are intended solely for the use of the individual or entity to whom they are addressed, shall be maintained in confidence and not disclosed to third parties without the written consent of the sender. If you are not the intended recipient or the person responsible for delivering the electronic mail to the intended recipient, be advised that you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return mail.
|[Prev in Thread]||Current Thread||[Next in Thread]|