[Asterisk-cvs] asterisk-addons/asterisk-ooh323c/src chan_h323.c, 1.19, 1.20

vphirke vphirke
Fri Nov 25 13:52:34 CST 2005


Update of /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src
In directory mongoose.digium.com:/tmp/cvs-serv26571/src

Modified Files:
	chan_h323.c 
Log Message:
Fix for ooh323_destroy() function related mutex lock problems

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/src/chan_h323.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- chan_h323.c	22 Nov 2005 18:13:55 -0000	1.19
+++ chan_h323.c	25 Nov 2005 18:41:11 -0000	1.20
@@ -2439,15 +2439,12 @@
          h323 = iflist;
          b_restartsearch = 0;
          while(h323) {
-            ast_mutex_lock(&h323->lock);
             /*TODO: Need to add rtptimeout keepalive support */
             if(ast_test_flag(h323, H323_NEEDDESTROY)) {
                ooh323_destroy(h323);
-               ast_mutex_unlock(&h323->lock);
                b_restartsearch = 1;
                break;
             }
-            ast_mutex_unlock(&h323->lock);
             h323 = h323->next;
          }
       }
@@ -2510,6 +2507,8 @@
 {
   /* NOTE: Assumes iflock already acquired */
    struct ooh323_pvt *prev=NULL,*cur = NULL;
+   ast_mutex_unlock(&p->lock);
+
    cur = iflist;
 
    if(gH323Debug)
@@ -2572,6 +2571,9 @@
 
       free(cur);
    }
+   else {
+      ast_mutex_unlock(&p->lock);
+   }
 
    if(gH323Debug)
       ast_verbose("+++   ooh323_destroy\n");




More information about the svn-commits mailing list