mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
move sig callback pointer to the span so it can be called from a function
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1015 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -2735,6 +2735,26 @@ OZ_DECLARE(zap_status_t) zap_span_start(zap_span_t *span)
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
|
||||
OZ_DECLARE(zap_status_t) zap_span_send_signal(zap_span_t *span, zap_sigmsg_t *sigmsg)
|
||||
{
|
||||
zap_status_t status = ZAP_FAIL;
|
||||
|
||||
if (span->signal_cb) {
|
||||
|
||||
if (sigmsg->channel) {
|
||||
zap_mutex_lock(sigmsg->channel->mutex);
|
||||
}
|
||||
|
||||
status = span->signal_cb(sigmsg);
|
||||
|
||||
if (sigmsg->channel) {
|
||||
zap_mutex_unlock(sigmsg->channel->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
OZ_DECLARE(zap_status_t) zap_global_init(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user