lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_connect is aborted (Was Re: tcp_new() returns NULL)


From: K.J. Mansley
Subject: Re: [lwip-users] tcp_connect is aborted (Was Re: tcp_new() returns NULL)
Date: 02 Dec 2004 18:59:15 +0000

On Thu, 2004-12-02 at 18:29, Chris Frost wrote:
> tcp_new() now returns non-NULL (I had just left several _init functions
> commented out...). Proceeding with trying to use the raw api over the
> loopback to send a string, my tcp_connect() ends with my err() being called
> with err=ERR_ABRT.

At first glance what you are doing looks OK.  I assume that your problem
is that your connected() or listen_accept() functions never get called?

I would try turning on the debugging macros (in debug.h) and see if that
throws up anything interesting, although the loopif code itself doesn't
have any useful print statements in there.  You could add some maybe?

There are the following interesting comments in loopif.c:

#if 0 /** TODO: I think this should be enabled, or not? Leon */
  netif->input = loopif_input;
#endif

and

        /**
         * workaround (patch #1779) to try to prevent bug #2595:
         * When connecting to "localhost" with the loopif interface,
         * tcp_output doesn't get the opportunity to finnish sending the
         * segment before tcp_process gets it, resulting in tcp_process
         * referencing pcb->unacked-> which still is NULL.
         * 
         * TODO: Is there still a race condition here? Leon
         */
        sys_timeout( 1, loopif_input, arg );

Leon might therefore be able to comment!

Kieran





reply via email to

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