|
From: | yueyue papa |
Subject: | [lwip-users] question about PPP shutdown |
Date: | Thu, 20 Nov 2008 16:20:07 +0800 |
status=0;
if(pppIOCtl(gpppInfo.hppp,PPPCTLG_UPSTATUS,&status)==0)
{
if(status)
{
return 1;
}
}
return -1;
int main(void)
{
int status;
/* no stdio-buffering, please! */
setvbuf(stdout, NULL,_IONBF, 0);
main_loop();
#if PPP_SUPPORT
{
int rc;
rc=pppClose(gpppInfo.hppp);
printf("pppClose %d\n", rc);
pppLinkTerminated(gpppInfo.hppp);
printf("pppLinkTerminated\n");
pppLinkDown(gpppInfo.hppp);
printf("pppLinkDown\n");
}
while( pppStatus() == 1)
{
printf("wait PPP shutdown\n");
OSTimeDlyMillisec(1000);
}
printf("PPP really shutdown, i make shutdown gprs module +++, ath\n");
sio_close(gpppInfo.ppp_sio);
#endif
return 0;
}
But the pppStauts() always give me 1.
Where is the problem for I shutdown the PPP link?
[Prev in Thread] | Current Thread | [Next in Thread] |