[pjsip] Thread Safety (And Reading Headers)

Colin Morelli colin.morelli at gmail.com
Thu Apr 21 10:23:14 EDT 2016


Hey all,

New to PJSIP here. I have two questions:

1. Regarding thread safety, the only thing I have found is that memory pool
allocation is *not* thread safe. If I'm doing no manual pool allocation in
my application, is it safe to use the standard pjsua API methods across
multiple threads? It seems like all of the relevant bits are acquiring the
PJSUA lock, so I assume so, but I wanted to check on that.

2. It's been a while since I have touched anything C, so that's probably
what's slowing me down here, but is there any way to just get a list of all
message headers with string keys and values from an instance of pjsip_msg?
I suppose I can iterate the list and call print_on for each, but I believe
that requires allocating a buffer from the pool which then brings up the
previously mentioned threading issues. Any ideas here?

Thanks in advance for your help.

Best,
Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20160421/370887c3/attachment-0002.html>


More information about the pjsip mailing list