lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]


From: Jeff Barber
Subject: Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]
Date: Mon, 10 Aug 2009 13:22:53 -0400

On Mon, Aug 10, 2009 at 12:58 PM, Chris Strahm<address@hidden> wrote:

>> Having set these to null, http_sent() with arg==NULL should also not
>> appear.   Could it be that
>> you changed close_conn() to not reset these callbacks??
>
> Well here's what comes out.  close_conn is called,
> then 2 more http_sent() calls come out both with arg=NULL
>
> CON>close_conn: pcb=0x40006468 hs=0x40004E64 ToSendCnt=2437
> CON>http_sent: pcb=0x40006468 hs=0x00000000 len=2437
> CON>http_sent: pcb=0x40006468 hs=0x00000000 len=1

> void close_conn(struct tcp_pcb *pcb, struct http_state *hs) {
[snip]
>   tcp_arg(pcb, NULL);
>   tcp_sent(pcb, NULL);

Maybe recursion?  Where is close_conn being called from here?  If the
code that is calling close_conn were to subsequently call tcp_sent --
reestablishing the callback -- that would explain what you're seeing.

Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]