From: Jeremy McNamara Date: Wed, 23 Apr 2003 21:52:46 +0000 (+0000) Subject: decrement useage counter on hangup X-Git-Tag: 0.5.0~600 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6eb85b943b8a3b7ac300155f056dd5c8377f0db2;p=thirdparty%2Fasterisk.git decrement useage counter on hangup git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@896 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/h323/ast_h323.h b/channels/h323/ast_h323.h index a7604834e1..e42d985719 100755 --- a/channels/h323/ast_h323.h +++ b/channels/h323/ast_h323.h @@ -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. */ diff --git a/channels/h323/chan_h323.c b/channels/h323/chan_h323.c index 52a989f541..ba57a4f34f 100755 --- a/channels/h323/chan_h323.c +++ b/channels/h323/chan_h323.c @@ -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; }