Baptiste Chaboud-crousaz wrote:
Sometimes, the face trouble with my callback http_connect - called by
the macro TCP_EVENT_SENT - because "arg" is null.
I don't understand that one:
a) there is no function 'http_connect' in the code you posted
b) TCP_EVENT_SENT calls the function set by calling tcp_sent(pcb, fn) -
the code you posted doesn't call tcp_sent().
c) I would have thought a connect function would be used with a client,
not a server - whereas an accept function (as you posted) is used with a
server, not a client)
My understanding is that the http_accept function binds a pcb to an
argument by a call to tcp_arg(...). I don't undersatnd why sometimes
my callback is called with a NULL arg!!!
This issue seems to be avoided/limited by increasing the size of
MEM_SIZE and PBUF_POOL_SIZE.
That could be a hint that you are writing beyond allocated memory
somwhere and overwrite the memory where the PCB lies with zeros...
If anybody has an idea, let me knwo about it...
Except for the above, I'm afraid I don't have an idea. Unless you call
*tcp_arg(pcb, NULL) somewhere else, of course...*
Does the argument get NULL during the connection or right at the start?
Simon
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users