[asterisk-commits] tilghman: trunk r334231 - in /trunk: ./ res/res_config_odbc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 1 12:31:37 CDT 2011


Author: tilghman
Date: Thu Sep  1 12:31:34 2011
New Revision: 334231

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334231
Log:
Merged revisions 334230 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334230 | tilghman | 2011-09-01 12:30:19 -0500 (Thu, 01 Sep 2011) | 25 lines
  
  Merged revisions 334229 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334229 | tilghman | 2011-09-01 12:28:09 -0500 (Thu, 01 Sep 2011) | 18 lines
    
    Create a local alias for ast_odbc_clear_cache.
    
    As a function pointer, the reference has to be resolved at load time
    irrespective of the RTLD_LAZY flag.  Creating a local alias solves
    this problem, because the structure is initialized with that local
    function pointer, while the actual function can remain lazily linked
    until runtime.
    
    The reason why this is important is because we lazily load function
    references during the module loading process, in order to obtain
    priority values for each module, ensuring that modules are loaded in
    the correct order.  Previous to this change, when this module was
    initially loaded, the module loader would emit a symbol resolution
    error, because of the above requirement.
    
    Closes ASTERISK-18399 (reported by Mikael Carlsson, fix suggested by
    Walter Doekes, patch by me)
  ........
................

Modified:
    trunk/   (props changed)
    trunk/res/res_config_odbc.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_config_odbc.c?view=diff&rev=334231&r1=334230&r2=334231
==============================================================================
--- trunk/res/res_config_odbc.c (original)
+++ trunk/res/res_config_odbc.c Thu Sep  1 12:31:34 2011
@@ -1131,6 +1131,11 @@
 #undef warn_length
 #undef warn_type
 
+static int unload_odbc(const char *a, const char *b)
+{
+	return ast_odbc_clear_cache(a, b);
+}
+
 static struct ast_config_engine odbc_engine = {
 	.name = "odbc",
 	.load_func = config_odbc,
@@ -1141,7 +1146,7 @@
 	.update_func = update_odbc,
 	.update2_func = update2_odbc,
 	.require_func = require_odbc,
-	.unload_func = ast_odbc_clear_cache,
+	.unload_func = unload_odbc,
 };
 
 static int unload_module (void)




More information about the asterisk-commits mailing list