From 41eb95e0557780e77042b979ffc151532e866b6d Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 4 Oct 2006 00:26:21 +0000 Subject: Merged revisions 44322 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44322 | kpfleming | 2006-10-03 19:25:44 -0500 (Tue, 03 Oct 2006) | 3 lines ensure that local include files are always used avoid a duplicate function name (term_init()) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44323 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 4 ++-- include/asterisk.h | 2 +- main/asterisk.c | 2 +- main/loader.c | 7 ++++--- main/term.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index fc130f6ec..c7e8031b8 100644 --- a/Makefile +++ b/Makefile @@ -136,8 +136,8 @@ HTTP_CGIDIR=/var/www/cgi-bin GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts) USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts) -MOD_SUBDIR_CFLAGS=-I../include -OTHER_SUBDIR_CFLAGS=-I../include +MOD_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include +OTHER_SUBDIR_CFLAGS=-I$(ASTTOPDIR)/include ifeq ($(OSARCH),linux-gnu) ifeq ($(PROC),x86_64) diff --git a/include/asterisk.h b/include/asterisk.h index 9b18733b1..a2fee3e57 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -57,7 +57,7 @@ int init_logger(void); /*!< Provided by logger.c */ void close_logger(void); /*!< Provided by logger.c */ int reload_logger(int); /*!< Provided by logger.c */ int init_framer(void); /*!< Provided by frame.c */ -int term_init(void); /*!< Provided by term.c */ +int ast_term_init(void); /*!< Provided by term.c */ int astdb_init(void); /*!< Provided by db.c */ void ast_channels_init(void); /*!< Provided by channel.c */ void ast_builtins_init(void); /*!< Provided by cli.c */ diff --git a/main/asterisk.c b/main/asterisk.c index d86e66a5b..456370143 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2577,7 +2577,7 @@ int main(int argc, char *argv[]) } #endif - term_init(); + ast_term_init(); printf(term_end()); fflush(stdout); diff --git a/main/loader.c b/main/loader.c index 8b149f2d7..dd33f9b1e 100644 --- a/main/loader.c +++ b/main/loader.c @@ -360,7 +360,7 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned strcpy(resource_being_loaded->resource, resource); if (!(lib = dlopen(fn, RTLD_LAZY | RTLD_LOCAL))) { - ast_log(LOG_WARNING, "%s\n", dlerror()); + ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in, dlerror()); free(resource_being_loaded); return NULL; } @@ -373,6 +373,7 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned module_list */ if (resource_being_loaded != (mod = AST_LIST_LAST(&module_list))) { + ast_log(LOG_WARNING, "Module '%s' did not register itself during load\n", resource_in); /* no, it did not, so close it and return */ while (!dlclose(lib)); /* note that the module's destructor will call ast_module_unregister(), @@ -395,7 +396,7 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned */ #if HAVE_RTLD_NOLOAD if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) { - ast_log(LOG_WARNING, "%s\n", dlerror()); + ast_log(LOG_WARNING, "Unable to promot flags on module '%s': %s\n", resource_in, dlerror()); while (!dlclose(lib)); free(resource_being_loaded); return NULL; @@ -412,7 +413,7 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned strcpy(resource_being_loaded->resource, resource); if (!(lib = dlopen(fn, wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) { - ast_log(LOG_WARNING, "%s\n", dlerror()); + ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in, dlerror()); free(resource_being_loaded); return NULL; } diff --git a/main/term.c b/main/term.c index 7240c80b1..a38399eda 100644 --- a/main/term.c +++ b/main/term.c @@ -72,7 +72,7 @@ static short convshort(char *s) return a + b * 256; } -int term_init(void) +int ast_term_init(void) { char *term = getenv("TERM"); char termfile[256] = ""; -- cgit v1.2.3