aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-04-23 21:52:46 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-04-23 21:52:46 +0000
commit6f8fece11a3a7b1fc545bb54668bfd5f1e257995 (patch)
tree2f706240ff8c80683f761b980f84d050b0689e24
parent02b13cb29bd6eb06545259b79fdd95b49d428cd8 (diff)
decrement useage counter on hangup
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@896 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/h323/ast_h323.h3
-rwxr-xr-xchannels/h323/chan_h323.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/channels/h323/ast_h323.h b/channels/h323/ast_h323.h
index a7604834e..e42d98571 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 52a989f54..ba57a4f34 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;
}