Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
Added "if (p != NULL) pbuf_free(p);" to the httpd_post_receive_data() and works like a charm. Thank you all. út 4. 2. 2020 v 17:49 odesílatel goldsimon napsal: > > > Trampas Stern wrote: > >err_t httpd_post_receive_data(void *connection, struct pbuf *p) > >{ > > pbuf_free(p); > >return ERR_OK;

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
I found some info in httpd.c that has call to httpd_post_receive_data() /** Pass received POST body data to the application and correctly handle * returning a response document or closing the connection. * ATTENTION: The application is responsible for the pbuf now, so don't free it! * * @param

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread goldsimon
Trampas Stern wrote: >err_t httpd_post_receive_data(void *connection, struct pbuf *p) >{ > pbuf_free(p); >return ERR_OK; >} Ah, yes. And the problem still is that the example does not do that. I'll file a bug... Regards, Simon ___ lwip-users mailing

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
I followed the contrib-2.1.0/examples/httpd/post_example/post_example.c, I did not notice any free of pbuf there. I guess if application is responsible for pbuf free then only httpd_post_receive_data() is candidate as it has pointer to data pbuf as parameter? út 4. 2. 2020 v 17:36 odesílatel gol

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Trampas Stern
err_t httpd_post_receive_data(void *connection, struct pbuf *p) { pbuf_free(p); return ERR_OK; } On Tue, Feb 4, 2020 at 11:35 AM goldsimon wrote: > > > Adam Baron wrote: > >I did search of POST related problems sorted by date. I will do so > >again. > > > >PBUF_POOL_SIZE is affecting number of

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread goldsimon
Adam Baron wrote: >I did search of POST related problems sorted by date. I will do so >again. > >PBUF_POOL_SIZE is affecting number of POST I can do directly. That is, >I >can do as many posts as PBUF_POOL_SIZE is defined. I think the user reporting this last time,did not free the pbuf passed to

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
I did search of POST related problems sorted by date. I will do so again. PBUF_POOL_SIZE is affecting number of POST I can do directly. That is, I can do as many posts as PBUF_POOL_SIZE is defined. @Trampas Stern I

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread goldsimon
Adam Baron wrote: >OK, so my lwip gets stuck exactly after 16 POSTs. > >Maybe the POST is not freeing PCB, or other structures properly. I rather think not freeing a pbuf could be the cause. I think we had that a little while ago. Have you searched the list archive? Regards, Simon ___

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Trampas Stern
/** * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. * (requires the LWIP_TCP option) */ #define MEMP_NUM_TCP_PCB10 /** * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. * (requires the LWIP_TCP option) */ #define MEMP_NUM_TCP_PCB_LIS

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
OK, so my lwip gets stuck exactly after 16 POSTs. Maybe the POST is not freeing PCB, or other structures properly. And I have overridden these out of default: #define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + 3) #define MEMP_NUM_UDP_PCB 6 #define MEMP_NUM_TCP_PCB 6 #define MEMP_NUM_TC

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
Not sure which parameter is defining maximum number of connections. Processor is ARM 32bit STM32F407. út 4. 2. 2020 v 15:38 odesílatel Trampas Stern napsal: > What is the maximum number of connections you have setup? > > Which processor are you using? > > Trampas > > On Tue, Feb 4, 2020 at 9:08

Re: [lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Trampas Stern
What is the maximum number of connections you have setup? Which processor are you using? Trampas On Tue, Feb 4, 2020 at 9:08 AM Adam Baron wrote: > I'm bit new to lwip, and I'm using it on STM32407 with ChibiOS which is > RTOS. I'm using current stable version of lwip and bindings form ChibiOS

[lwip-users] httpd POST gets stuck after few requests

2020-02-04 Thread Adam Baron
I'm bit new to lwip, and I'm using it on STM32407 with ChibiOS which is RTOS. I'm using current stable version of lwip and bindings form ChibiOS to run it as threads. My static and also dynamically generated html pages are served well and without any issues. But I have problem with POST. I use the