mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-17 02:02:22 +00:00
I noted this on the dev list but got no response, so I just did it myself.
Lock the call features when being used in chan_sip. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1070,14 +1070,23 @@ static struct ast_call_feature *find_feature(const char *name)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void ast_rdlock_call_features(void)
|
||||
{
|
||||
ast_rwlock_rdlock(&features_lock);
|
||||
}
|
||||
|
||||
void ast_unlock_call_features(void)
|
||||
{
|
||||
ast_rwlock_unlock(&features_lock);
|
||||
}
|
||||
|
||||
/*! \brief find a call feature by name */
|
||||
struct ast_call_feature *ast_find_call_feature(char *name)
|
||||
struct ast_call_feature *ast_find_call_feature(const char *name)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < FEATURES_COUNT; x++) {
|
||||
if (!strcasecmp(name, builtin_features[x].sname)) {
|
||||
if (!strcasecmp(name, builtin_features[x].sname))
|
||||
return &builtin_features[x];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user