[asterisk-dev] implementing struct ast_channel with astobj2 ?

Luigi Rizzo rizzo at icir.org
Thu Nov 15 08:53:45 CST 2007


is there any work going on for implementing struct ast_channel with astobj2?

I am running in a problem with the video extensions that i think
already came out in some other channel driver, and would be completely
solved implementing ast_channel using refcounted structures.

In this specific case, there is a thread handling video that needs
to access part of the struct ast_channel, and grab a lock on it.
During hangup, the hangup handler is called with the channel locked,
so the only way to synchronize the handler and the video thread is
release the lock and wait for the thread to terminate. If we don't
synchronize, the channel is destroyed when the hangup handler
completes, and the video thread will access a non existing structure.

cheers
luigi



More information about the asterisk-dev mailing list