|
From: | xcbman |
Subject: | [lwip-users] about pppClose problem? |
Date: | Mon, 7 Jul 2008 18:42:16 +0800 |
i have a problem about
pppClose() func return very slow everytime(exit pppMain()), here is my trace
about PPPclose():
06-27 11:20:48 pppMainWakeup:
unit 0
06-27 11:20:48
pppClose:linkStatusCB==NULL
06-27 11:20:48 pppMain: unit
0 kill_link -> pppStopCB
06-27 11:20:48 pppStopCB:
unit 0
06-27 11:20:48 link_down:
0
06-27 11:20:48
upap_lowerdown: 0 s=1
06-27 11:20:48 ipcp:
down
06-27 11:20:48 np_down: 0
proto=21
06-27 11:20:48 sifvjcomp: VJ
compress enable=0 slot=0 max slot=0
06-27 11:20:48 sifdown: unit
0: linkStatusCB=0 errCode=-5
06-27 11:20:48 IPCP:
lowerdown state 9 (LS_OPENED) -> 1 (LS_STARTING)
06-27 11:20:48 IPCP: close
reason=LCP down state 1 (LS_STARTING) -> 0 (LS_INITIAL)
06-27 11:20:48 pppLinkDown:
unit 0
06-27 11:20:48 pppMainWakeup:
unit 0
06-27 11:20:48
ppp_send_config[0]: outACCM=FF FF FF FF
06-27 11:20:48
ppp_recv_config[0]: inACCM=0 0 0 0
06-27 11:20:48 pppWrite[0]:
len=28
06-27 11:20:48
fsm_sdata(LCP): Sent code 5,2,16.
06-27 11:20:48 LCP: close
reason=User request state 9 (LS_OPENED) -> 4 (LS_CLOSING)
06-27 11:20:48 pppInProc[0]:
got 10 bytes
06-27 11:20:48 pppInput[0]:
IPCP len=4
06-27 11:20:48
fsm_input(8021): Rcvd packet in state 0 (LS_INITIAL).
06-27 11:20:49 pppInProc[0]:
got 6 bytes
06-27 11:20:51 pppInProc[0]:
got 12 bytes
06-27 11:20:54 LCP: timeout
resending Terminate-Requests state=4 (LS_CLOSING) //always timeout(6s)
,why?
06-27 11:20:54 pppWrite[0]:
len=29
06-27 11:20:54
fsm_sdata(LCP): Sent code 5,3,16.
06-27 11:21:00 LCP: timeout
sending Terminate-Request state=4 (LS_CLOSING) //always timeout(6s),
why?
06-27 11:21:00
link_terminated: 0
06-27 11:21:00 Connection
terminated.
06-27 11:21:00
pppLinkTerminated: unit 0
06-27 11:21:00 pppMainWakeup:
unit 0
06-27 11:21:00 pppMain: unit
0: PHASE_DEAD
06-27 11:21:00 pppDrop: pbuf
len=25
06-27 11:21:00 pppMain: unit
0: linkStatusCB=0 errCode=-5
06-27 11:21:00 pppClose:0
status=0 cb=0
////////////////////////////////////////////////////////////////////////////////////////////////////
here is pppCLose() source code,in my code is
pc->linkStatusCB=NULL,so it while wait for PHASE_DEAD
/* Close a PPP connection and release the descriptor.
* Any outstanding packets in the queues are dropped. * Return 0 on success, an error code on failure. */ int pppClose(int pd) { PPPControl *pc = &pppControl[pd]; int st = 0; /* Disconnect */
#if PPPOE_SUPPORT if(pc->ethif) { PPPDEBUG((LOG_DEBUG, "pppClose: unit %d kill_link -> pppStopCB\n", pd)); pc->errCode = PPPERR_USER; /* This will leave us at PHASE_DEAD. */ tcpip_callback(pppStopCB, (void*)pd); } else #endif /* PPPOE_SUPPORT */ { #if PPPOS_SUPPORT pc->kill_link = !0; pppMainWakeup(pd); #endif /* PPPOS_SUPPORT */ } if(!pc->linkStatusCB)
{
while(st >= 0 && lcp_phase[pd] != PHASE_DEAD) { sys_msleep(500); break; //why this break? can i remove it? } } return st;
} |
[Prev in Thread] | Current Thread | [Next in Thread] |