lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] tcp_connection cann't start the callback function after con


From: vincent cui
Subject: [lwip-users] tcp_connection cann't start the callback function after connection successfully
Date: Tue, 6 Sep 2011 09:21:43 +0000

Dear :
I am porting the ftpd.c to my system, and find the following code is used to 
create a new connection for send / recv data.
But after tcp_connection return correctly, the ftpd_dataconnected callback is 
not executed. 
Why ?

        fsm->datapcb = tcp_new(); 
        if (fsm->datapcb == NULL)
        {
                printf ("create data pcb fail \r\n");
        }  
    if ( ERR_USE == tcp_bind(fsm->datapcb, &pcb->local_ip, 20))
        {
                printf(" port 20 is in used \r\n");
        }   
  
    tcp_arg(fsm->datapcb, fsm->datafs);   
    if ( ERR_OK != tcp_connect(fsm->datapcb, &fsm->dataip, fsm->dataport, 
ftpd_dataconnected))
        {
                return 1;
        }  



reply via email to

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