[asterisk-bugs] [Asterisk 0010846]: AST_MODULE_INFO macro with wrong parameter order for c++ code modules.h

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Sep 30 14:43:20 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=10846 
====================================================================== 
Reported By:                alebm
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   10846
Category:                   Addons/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-28-2007 13:18 CDT
Last Modified:              09-30-2007 14:43 CDT
====================================================================== 
Summary:                    AST_MODULE_INFO macro with wrong parameter order for
c++ code modules.h
Description: 
AST_MODULE_INFO is define as
#define AST_MODULE_INFO(keystr, flags_to_set, desc, load_func,
unload_func, reload_func)	\
	static struct ast_module_info __mod_info = {	\
		NULL,					\
		load_func,				\
		unload_func,				\
		reload_func,				\
		AST_MODULE,				\
		desc,					\
		keystr,					\
		flags_to_set				\
	};						\

for c++ code, but the struct ast_module_info is defined as
struct ast_module_info {
	struct ast_module *self;
	enum ast_module_load_result (*load)(void);	
	int (*reload)(void);			
	int (*unload)(void);			
	const char *name;			
	const char *description;		
	const char *key;
	unsigned int flags;
};

the unload_func/reload_func are swaped in the macro definition
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 09-30-07 14:43  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 84146

------------------------------------------------------------------------
r84146 | russell | 2007-09-30 14:43:17 -0500 (Sun, 30 Sep 2007) | 4 lines

Fix the AST_MODULE_INFO macro for C++ modules.  The load and reload
parameters
were in the wrong place.
(closes issue http://bugs.digium.com/view.php?id=10846, alebm)

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-30-07 14:43  svnbot         Checkin                                      
09-30-07 14:43  svnbot         Note Added: 0071215                          
09-30-07 14:43  svnbot         Status                   new => assigned     
09-30-07 14:43  svnbot         Assigned To               => russell         
======================================================================




More information about the asterisk-bugs mailing list