dect
/
asterisk
Archived
13
0
Fork 0

decrement useage counter on hangup

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@896 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
jeremy 2003-04-23 21:52:46 +00:00
parent 02b13cb29b
commit 6f8fece11a
2 changed files with 10 additions and 2 deletions

View File

@ -61,7 +61,8 @@
#define AST_FORMAT_G729A (1 << 8)
/*! SpeeX Free Compression */
#define AST_FORMAT_SPEEX (1 << 9)
/*! ILBC Free Codec */
#define AST_FORMAT_ILBC (1 << 10)
/**This class describes the G.723.1 codec capability.
*/

View File

@ -464,7 +464,14 @@ static int oh323_hangup(struct ast_channel *c)
p->needdestroy = 1;
}
/* Update usage counter */
ast_pthread_mutex_lock(&usecnt_lock);
usecnt--;
if (usecnt < 0)
ast_log(LOG_WARNING, "Usecnt < 0\n");
ast_pthread_mutex_unlock(&usecnt_lock);
ast_update_use_count();
ast_pthread_mutex_unlock(&p->lock);
return 0;
}