Sorry...this should also have included cyg_ppp_up().  That sometimes never 
returns as well..symptom is the same as with cyg_ppp_wait_up()....

The core ppp loop is fairly trivial, but it does bring the connection up/down a 
lot to minimize connection time costs:

    cyg_ppp_handle_t pppHandle = cyg_ppp_up(PPP_PORT, &options);
    if (pppHandle != 0) {
        int pppStatus = cyg_ppp_wait_up(pppHandle);
        if (pppStatus == 0) {
            // wait for connection to come down
            if (cyg_ppp_wait_up(pppHandle) == 0) {
                while ((pppTimeout-- > 0) && (cyg_ppp_wait_up(pppHandle) == 0)) 
{
                    Thread::sleep(sec(1));
                }
                cyg_ppp_down(pppHandle);
            }
        }
     }


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to