[Asterisk-bsd] Re: FreeBSD hang up when exiting * (Zeno Lee)

Charles A.Newcomer charles at iapc.net
Mon Jan 17 13:21:15 CST 2005


Greetings:

It looks like there is a bug in the zaptel driver from 
zaptel-freebsd-0.8.

It manifest itself when the zt_chan_read call is interrupted. (To 
reproduce
run zttest and hit ^C).  I first noticed it when doing a STOP NOW.

Changing the schluffen routine as follows fixes the problem:

> static int schluffen(void *q)
> {
>    int rc;
>
>         switch (rc=tsleep(q, PZERO | PCATCH, "schluffen", 0)) {
>            case    EINTR:
>            case ERESTART: return(rc);
>         }
>         return(0);
> }
>


This allows the for (;;) loop to exit after an interrupt.


Thanks,
/can



More information about the Asterisk-BSD mailing list