[Asterisk-Dev] moh again... architectural bug (missing synchronization)

Luigi Rizzo rizzo at icir.org
Wed Jun 15 09:03:16 MST 2005


so after fixing thread issues, i am still not getting moh.

I wonder if the lack of /dev/zap/timer prevents moh from
working, which seems a real bug considering that the generator
already supplies the necessary data...

Anyways the situation i see is the following:

- the alloc function on the generator is called, and the client
  registered. HOWEVER, i have no /dev/zap/timer so ast_settimeout()
  is ignored and there is no event that signals the channel that
  somebody is writing to it.
  I suppose ast_settimeout() should register the generator's pipe as a
  descriptor to poll.

- mpg123 correctly produces data and writes them to its end of
  the moh pipe (in mohmp3thread).
  However noone drains the other end of the pipe so after 16kb
  the pipe fills up and even these writes start failing.

I am not familiar enough with the channel() architecture to figure
out what to do in ast_settimeout() to provide an alternative
source of synchronization when /dev/zap/timer is available,
but probably it is something trivial...

	thanks
	luigi



More information about the asterisk-dev mailing list