[asterisk-commits] oej: branch oej/moremanager r233877 - in /team/oej/moremanager: ./ formats/ i...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 9 13:52:19 CST 2009
Author: oej
Date: Wed Dec 9 13:52:13 2009
New Revision: 233877
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233877
Log:
Resolve conflict, reset automerge
Modified:
team/oej/moremanager/ (props changed)
team/oej/moremanager/formats/format_g723.c
team/oej/moremanager/formats/format_g726.c
team/oej/moremanager/formats/format_g729.c
team/oej/moremanager/formats/format_gsm.c
team/oej/moremanager/formats/format_h263.c
team/oej/moremanager/formats/format_h264.c
team/oej/moremanager/formats/format_ilbc.c
team/oej/moremanager/formats/format_jpeg.c
team/oej/moremanager/formats/format_ogg_vorbis.c
team/oej/moremanager/formats/format_pcm.c
team/oej/moremanager/formats/format_sln.c
team/oej/moremanager/formats/format_vox.c
team/oej/moremanager/formats/format_wav.c
team/oej/moremanager/formats/format_wav_gsm.c
team/oej/moremanager/include/asterisk/module.h
team/oej/moremanager/main/loader.c
Propchange: team/oej/moremanager/
------------------------------------------------------------------------------
automerge = http://www.codename-pineapple.org/
Propchange: team/oej/moremanager/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 9 13:52:13 2009
@@ -1,1 +1,1 @@
-/branches/1.4:1-233654
+/branches/1.4:1-233876
Modified: team/oej/moremanager/formats/format_g723.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_g723.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_g723.c (original)
+++ team/oej/moremanager/formats/format_g723.c Wed Dec 9 13:52:13 2009
@@ -160,4 +160,7 @@
return ast_format_unregister(g723_1_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "G.723.1 Simple Timestamp File Format");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "G.723.1 Simple Timestamp File Format",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_g726.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_g726.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_g726.c (original)
+++ team/oej/moremanager/formats/format_g726.c Wed Dec 9 13:52:13 2009
@@ -274,4 +274,7 @@
return(0);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw G.726 (16/24/32/40kbps) data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw G.726 (16/24/32/40kbps) data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_g729.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_g729.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_g729.c (original)
+++ team/oej/moremanager/formats/format_g729.c Wed Dec 9 13:52:13 2009
@@ -156,4 +156,7 @@
return ast_format_unregister(g729_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw G729 data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw G729 data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_gsm.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_gsm.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_gsm.c (original)
+++ team/oej/moremanager/formats/format_gsm.c Wed Dec 9 13:52:13 2009
@@ -180,4 +180,7 @@
return ast_format_unregister(gsm_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw GSM data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw GSM data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_h263.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_h263.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_h263.c (original)
+++ team/oej/moremanager/formats/format_h263.c Wed Dec 9 13:52:13 2009
@@ -194,4 +194,7 @@
return ast_format_unregister(h263_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw H.263 data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw H.263 data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_h264.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_h264.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_h264.c (original)
+++ team/oej/moremanager/formats/format_h264.c Wed Dec 9 13:52:13 2009
@@ -183,4 +183,7 @@
return ast_format_unregister(h264_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw H.264 data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw H.264 data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_ilbc.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_ilbc.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_ilbc.c (original)
+++ team/oej/moremanager/formats/format_ilbc.c Wed Dec 9 13:52:13 2009
@@ -154,4 +154,7 @@
return ast_format_unregister(ilbc_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw iLBC data");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw iLBC data",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_jpeg.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_jpeg.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_jpeg.c (original)
+++ team/oej/moremanager/formats/format_jpeg.c Wed Dec 9 13:52:13 2009
@@ -124,4 +124,7 @@
return 0;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JPEG (Joint Picture Experts Group) Image Format");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "JPEG (Joint Picture Experts Group) Image Format",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_ogg_vorbis.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_ogg_vorbis.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_ogg_vorbis.c (original)
+++ team/oej/moremanager/formats/format_ogg_vorbis.c Wed Dec 9 13:52:13 2009
@@ -568,5 +568,8 @@
return ast_format_unregister(vorbis_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "OGG/Vorbis audio");
-
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "OGG/Vorbis audio",
+ .load = load_module,
+ .unload = unload_module,
+);
+
Modified: team/oej/moremanager/formats/format_pcm.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_pcm.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_pcm.c (original)
+++ team/oej/moremanager/formats/format_pcm.c Wed Dec 9 13:52:13 2009
@@ -504,4 +504,7 @@
|| ast_format_unregister(g722_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_sln.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_sln.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_sln.c (original)
+++ team/oej/moremanager/formats/format_sln.c Wed Dec 9 13:52:13 2009
@@ -138,4 +138,7 @@
return ast_format_unregister(slin_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw Signed Linear Audio support (SLN)");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Raw Signed Linear Audio support (SLN)",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_vox.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_vox.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_vox.c (original)
+++ team/oej/moremanager/formats/format_vox.c Wed Dec 9 13:52:13 2009
@@ -143,4 +143,7 @@
return ast_format_unregister(vox_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialogic VOX (ADPCM) File Format");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Dialogic VOX (ADPCM) File Format",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_wav.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_wav.c (original)
+++ team/oej/moremanager/formats/format_wav.c Wed Dec 9 13:52:13 2009
@@ -528,4 +528,7 @@
return ast_format_unregister(wav_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (8000Hz Signed Linear)");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Microsoft WAV format (8000Hz Signed Linear)",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/formats/format_wav_gsm.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/formats/format_wav_gsm.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/formats/format_wav_gsm.c (original)
+++ team/oej/moremanager/formats/format_wav_gsm.c Wed Dec 9 13:52:13 2009
@@ -559,4 +559,7 @@
return ast_format_unregister(wav49_f.name);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (Proprietary GSM)");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_FIRST, "Microsoft WAV format (Proprietary GSM)",
+ .load = load_module,
+ .unload = unload_module,
+);
Modified: team/oej/moremanager/include/asterisk/module.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/include/asterisk/module.h?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/include/asterisk/module.h (original)
+++ team/oej/moremanager/include/asterisk/module.h Wed Dec 9 13:52:13 2009
@@ -180,6 +180,14 @@
AST_MODFLAG_DEFAULT = 0,
AST_MODFLAG_GLOBAL_SYMBOLS = (1 << 0),
AST_MODFLAG_BUILDSUM = (1 << 1),
+ /*!
+ * \brief Load this module in the first pass on auto loading
+ *
+ * When module auto loading is used, modules with this flag set will
+ * be loaded after preloaded modules, but before all modules being
+ * automatically loaded without this flag set on them.
+ */
+ AST_MODFLAG_LOAD_FIRST = (1 << 2),
};
struct ast_module_info {
Modified: team/oej/moremanager/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/moremanager/main/loader.c?view=diff&rev=233877&r1=233876&r2=233877
==============================================================================
--- team/oej/moremanager/main/loader.c (original)
+++ team/oej/moremanager/main/loader.c Wed Dec 9 13:52:13 2009
@@ -122,6 +122,19 @@
*/
struct ast_module *resource_being_loaded;
+/*! \brief Load modules in this order. */
+enum module_load_pass {
+ /*! \brief AST_MODFLAG_LOAD_FIRST */
+ LOAD_FIRST,
+ /*! \brief AST_MODFLAG_GLOBAL_SYMBOLS */
+ LOAD_GLOBAL_SYMBOLS,
+ /*! \brief everything that is left */
+ LOAD_ALL,
+
+ /*! \brief Must remain at the end. */
+ LOAD_DONE,
+};
+
/* XXX: should we check for duplicate resource names here? */
void ast_module_register(const struct ast_module_info *info)
@@ -344,13 +357,13 @@
while (!dlclose(lib));
}
-static struct ast_module *load_dynamic_module(const char *resource_in, unsigned int global_symbols_only)
+static struct ast_module *load_dynamic_module(const char *resource_in, enum module_load_pass load_pass)
{
char fn[256];
void *lib;
struct ast_module *mod;
char *resource = (char *) resource_in;
- unsigned int wants_global;
+ unsigned int wants_global = 0, not_yet = 0;
if (strcasecmp(resource + strlen(resource) - 3, ".so")) {
resource = alloca(strlen(resource_in) + 3);
@@ -391,11 +404,22 @@
return NULL;
}
- wants_global = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);
-
- /* if we are being asked only to load modules that provide global symbols,
- and this one does not, then close it and return */
- if (global_symbols_only && !wants_global) {
+ switch (load_pass) {
+ case LOAD_FIRST:
+ not_yet = !ast_test_flag(mod->info, AST_MODFLAG_LOAD_FIRST);
+ break;
+ case LOAD_GLOBAL_SYMBOLS:
+ wants_global = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);
+ not_yet = !wants_global;
+ break;
+ case LOAD_ALL:
+ break;
+ case LOAD_DONE:
+ ast_log(LOG_ERROR, "Satan just bought a snowblower! (This should never happen, btw.)\n");
+ break;
+ }
+
+ if (not_yet) {
while (!dlclose(lib));
return NULL;
}
@@ -705,7 +729,7 @@
return 0;
}
-static enum ast_module_load_result load_resource(const char *resource_name, unsigned int global_symbols_only)
+static enum ast_module_load_result load_resource(const char *resource_name, enum module_load_pass load_pass)
{
struct ast_module *mod;
enum ast_module_load_result res = AST_MODULE_LOAD_SUCCESS;
@@ -716,13 +740,29 @@
ast_log(LOG_WARNING, "Module '%s' already exists.\n", resource_name);
return AST_MODULE_LOAD_DECLINE;
}
- if (global_symbols_only && !ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS))
- return AST_MODULE_LOAD_SKIP;
+
+ switch (load_pass) {
+ case LOAD_FIRST:
+ if (!ast_test_flag(mod->info, AST_MODFLAG_LOAD_FIRST)) {
+ return AST_MODULE_LOAD_SKIP;
+ }
+ break;
+ case LOAD_GLOBAL_SYMBOLS:
+ if (!ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS)) {
+ return AST_MODULE_LOAD_SKIP;
+ }
+ break;
+ case LOAD_ALL:
+ break;
+ case LOAD_DONE:
+ ast_log(LOG_ERROR, "This should never happen, -EFLAMES!\n");
+ break;
+ }
} else {
#ifdef LOADABLE_MODULES
- if (!(mod = load_dynamic_module(resource_name, global_symbols_only))) {
+ if (!(mod = load_dynamic_module(resource_name, load_pass))) {
/* don't generate a warning message during load_modules() */
- if (!global_symbols_only) {
+ if (load_pass == LOAD_ALL) {
ast_log(LOG_WARNING, "Module '%s' could not be loaded.\n", resource_name);
return AST_MODULE_LOAD_DECLINE;
} else {
@@ -838,6 +878,7 @@
struct load_order load_order;
int res = 0;
int modulecount = 0;
+ int load_pass;
int translate_status;
char newname[18]; /* although this would normally be 80, max length in translate_module_name is 18 */
@@ -947,25 +988,29 @@
if (load_count)
ast_log(LOG_NOTICE, "%d modules will be loaded.\n", load_count);
- /* first, load only modules that provide global symbols */
- AST_LIST_TRAVERSE_SAFE_BEGIN(&load_order, order, entry) {
- switch (load_resource(order->resource, 1)) {
- case AST_MODULE_LOAD_SUCCESS:
- modulecount++;
- case AST_MODULE_LOAD_DECLINE:
- AST_LIST_REMOVE_CURRENT(&load_order, entry);
- free(order->resource);
- free(order);
- break;
- case AST_MODULE_LOAD_FAILURE:
- res = -1;
- goto done;
- case AST_MODULE_LOAD_SKIP:
- /* try again later */
- break;
- }
- }
- AST_LIST_TRAVERSE_SAFE_END;
+ for (load_pass = 0; load_pass < LOAD_DONE; load_pass++) {
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&load_order, order, entry) {
+ switch (load_resource(order->resource, load_pass)) {
+ case AST_MODULE_LOAD_SUCCESS:
+ modulecount++;
+ case AST_MODULE_LOAD_DECLINE:
+ AST_LIST_REMOVE_CURRENT(&load_order, entry);
+ free(order->resource);
+ free(order);
+ break;
+ case AST_MODULE_LOAD_FAILURE:
+ res = -1;
+ goto done;
+ case AST_MODULE_LOAD_SKIP:
+ /*
+ * Try again later. This result is received when a module is
+ * deferred because it is not a part of the current pass.
+ */
+ break;
+ }
+ }
+ AST_LIST_TRAVERSE_SAFE_END;
+ }
/* now load everything else */
AST_LIST_TRAVERSE_SAFE_BEGIN(&load_order, order, entry) {
@@ -987,6 +1032,8 @@
}
AST_LIST_TRAVERSE_SAFE_END;
+=======
+>>>>>>> .merge-right.r233782
done:
while ((order = AST_LIST_REMOVE_HEAD(&load_order, entry))) {
free(order->resource);
More information about the asterisk-commits
mailing list