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

Modified Files:
        cdr_addon_mysql.c 
Log Message:
ensure that the connection lock is taking during a reload (bug #4586)


Index: cdr_addon_mysql.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/cdr_addon_mysql.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cdr_addon_mysql.c   27 Apr 2005 01:20:40 -0000      1.8
+++ cdr_addon_mysql.c   23 Jun 2005 17:40:37 -0000      1.9
@@ -428,8 +428,14 @@
 
 int reload(void)
 {
+       int ret;
+
+       ast_mutex_lock(&mysql_lock);    
        my_unload_module();
-       return my_load_module();
+       ret = my_load_module();
+       ast_mutex_unlock(&mysql_lock);
+
+       return ret;
 }
 
 int usecount(void)

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to