diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-03 20:38:13 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-03 20:38:13 +0000 |
commit | a0b795f0812a231bc7a0c097931f5cc8d51333d2 (patch) | |
tree | 2f5ac9dbc27e12f1fe4c415ab79132b90a09856d /utils.c | |
parent | 8d68ea3d42ef1bcecf2a8f23ab73e875cc529132 (diff) |
set the DIALSTATUS variable to contain "INVALIDARGS" when the dial application
exits early because of invalid arguments instead of just leaving it empty.
(issue #8975)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@53133 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -907,3 +907,14 @@ void ast_enable_packet_fragmentation(int sock) #endif } +AST_MUTEX_DEFINE_STATIC(fetchadd_m); /* used for all fetc&add ops */ + +int ast_atomic_fetchadd_int_slow(volatile int *p, int v) +{ + int ret; + ast_mutex_lock(&fetchadd_m); + ret = *p; + *p += v; + ast_mutex_unlock(&fetchadd_m); + return ret; +} |