[asterisk-commits] russell: trunk r108034 - /trunk/funcs/func_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 12 12:06:37 CDT 2008


Author: russell
Date: Wed Mar 12 12:06:37 2008
New Revision: 108034

URL: http://svn.digium.com/view/asterisk?view=rev&rev=108034
Log:
 - Add Tilghman to the copyright info ... he wrote the hard part :)
 - Remove some magic in unload_module that isn't needed.  Module use counts
   already ensure that the function isn't going to be in use at this point.

Modified:
    trunk/funcs/func_config.c

Modified: trunk/funcs/func_config.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_config.c?view=diff&rev=108034&r1=108033&r2=108034
==============================================================================
--- trunk/funcs/func_config.c (original)
+++ trunk/funcs/func_config.c Wed Mar 12 12:06:37 2008
@@ -4,6 +4,7 @@
  * Copyright (C) 2008, Digium, Inc.
  *
  * Russell Bryant <russell at digium.com>
+ * Tilghman Lesher <func_config__200803 at the-tilghman.com>
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact
@@ -21,6 +22,7 @@
  * \brief A function to retrieve variables from an Asterisk configuration file
  *
  * \author Russell Bryant <russell at digium.com>
+ * \author Tilghman Lesher <func_config__200803 at the-tilghman.com>
  * 
  * \ingroup functions
  */
@@ -170,20 +172,13 @@
 	struct config_item *cur;
 	int res = ast_custom_function_unregister(&config_function);
 
-	/* Allow anything already in the routine to exit */
-	usleep(1);
 	AST_RWLIST_WRLOCK(&configs);
-	usleep(1);
-	AST_RWLIST_UNLOCK(&configs);
-	/* Even if it needed to upgrade a lock */
-	usleep(1);
-	AST_RWLIST_WRLOCK(&configs);
-	/* At this point, no other thread should be queued inside this module */
 	while ((cur = AST_RWLIST_REMOVE_HEAD(&configs, entry))) {
 		ast_config_destroy(cur->cfg);
 		ast_free(cur);
 	}
 	AST_RWLIST_UNLOCK(&configs);
+
 	return res;
 }
 




More information about the asterisk-commits mailing list