[asterisk-dev] Implementation using libpri and socketpair()

Moises Silva moises.silva at gmail.com
Wed Feb 7 16:20:43 MST 2007


> How can I avoid this behavior? Maybe using another way different of
> socketpair ?
I have not used libpri, nor completly understand how it works, but it
seems to me that if you need just 1 message to be returned from read,
you just need to make a wraper of read() where you just return 1
message and put in a queue the other possibly returned message, the
next time your app call readwrapper() return the next message on the
queue if exists, otherwise, call the real read() again. Would this
approach work for you?

Regards


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"


More information about the asterisk-dev mailing list