Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Bas Prins
Hi all, I found the problem, which was rather easy to find once I convinced myself I am man enough to actually read code ;-). But now I wonder how to solve this appropriately. The problem seems to be, that this function decreases the ticks, until the timeout period is consumed, and then simply

Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Bas Prins
Dear , I don't think I am able to reset the timer. The 'arg' passed in err_t rec_fn(void *arg, struct altcp_pcb *conn, struct pbuf *p, err_t err) is not of type httpc_state_t. The rec_fn callback is called here: static err_t httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p,

Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Rémy DZIEMIASZKO
Hello, When you call 'httpc_get_file' the parameter 'connection' gives you a handle on the http_state used for that connection then you can passes this handle to 'httpc_get_file' via the parameter 'void * callback_arg' then your received function will get the handle via the parameter 'void * arg'

Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Bas Prins
Hi Remy, Thanks for your answer. It feels a bit awkward this way though. Do you know any reason why user code should be bothered with reloading the timeout ticks? Why doesn't http_client deal with this when it gets notified about a new packet on " httpc_tcp_recv" ? And no, the opaque type is

Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Simon Goldschmidt
Am 16. Juni 2021 20:15:02 MESZ schrieb "Rémy DZIEMIASZKO" : >Le mer. 16 juin 2021 à 15:24, Bas Prins a écrit >: >> >> Hi Remy, >> >> Thanks for your answer. >> >> It feels a bit awkward this way though. Do you know any reason why >user code should be bothered with reloading the timeout ticks?

Re: [lwip-users] httpc_get_file doesn't seem to download entire file?

2021-06-16 Thread Rémy DZIEMIASZKO
Le mer. 16 juin 2021 à 15:24, Bas Prins a écrit : > > Hi Remy, > > Thanks for your answer. > > It feels a bit awkward this way though. Do you know any reason why user code > should be bothered with reloading the timeout ticks? Why doesn't http_client > deal with this when it gets notified about