[Asterisk-Dev] Modules doesn't free from asterisk
Miroslaw KLABA
totoro at ovh.net
Wed Apr 23 13:21:50 MST 2003
Hello,
Here is a patch against the CVS version that corrects the h323 driver.
I adds a count down for "usecnt" when the channel is hanged up.
Thanks
Miro
-------------- next part --------------
--- channels/h323/chan_h323.c Wed Apr 23 22:00:45 2003
+++ channels/h323/chan_h323.c.new Wed Apr 23 22:04:41 2003
@@ -463,6 +463,15 @@
ast_log(LOG_DEBUG, "ClearCall failed.\n");
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);
More information about the asterisk-dev
mailing list