[svn-commits] trunk r19767 - /trunk/loader.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Apr 13 08:28:25 MST 2006


Author: kpfleming
Date: Thu Apr 13 10:28:24 2006
New Revision: 19767

URL: http://svn.digium.com/view/asterisk?rev=19767&view=rev
Log:
remove extraneous warning message

Modified:
    trunk/loader.c

Modified: trunk/loader.c
URL: http://svn.digium.com/view/asterisk/trunk/loader.c?rev=19767&r1=19766&r2=19767&view=diff
==============================================================================
--- trunk/loader.c (original)
+++ trunk/loader.c Thu Apr 13 10:28:24 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  *
@@ -696,12 +696,12 @@
 
 	/* open in a sane way */
 	cur->lib = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
-	if (cur->lib == NULL) {
-		ast_log(LOG_WARNING, "cannot load %s %s\n", fn, dlerror());
-	} else if ( (m1 = find_symbol(cur, "mod_data", 0)) == NULL || m1->type == MOD_0) {
+	if (cur->lib) {
+		if ((m1 = find_symbol(cur, "mod_data", 0)) == NULL || m1->type == MOD_0) {
 		/* old-style module, close and reload with standard flags */
-		dlclose(cur->lib);
-		cur->lib = NULL;
+			dlclose(cur->lib);
+			cur->lib = NULL;
+		}
 	}
 	if (cur->lib == NULL)	/* try reopen with the old style */
 		cur->lib = dlopen(fn, flags);



More information about the svn-commits mailing list