aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323/chan_h323.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/h323/chan_h323.c')
-rwxr-xr-xchannels/h323/chan_h323.c9
1 files changed, 8 insertions, 1 deletions
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;
}