svn commit: samba r4008 - in trunk/source/lib: .

jra at samba.org jra at samba.org
Tue Nov 30 01:01:47 GMT 2004


Author: jra
Date: 2004-11-30 01:01:43 +0000 (Tue, 30 Nov 2004)
New Revision: 4008

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4008

Log:
Fix from Timur Bakeyev <timur at com.bat.ru> for bugid #2100,
change the way we check for errors after a dlopen (which
may set internal warnings which get picked up by mistake
in dlsym).
Jeremy

Modified:
   trunk/source/lib/module.c


Changeset:
Modified: trunk/source/lib/module.c
===================================================================
--- trunk/source/lib/module.c	2004-11-30 00:22:04 UTC (rev 4007)
+++ trunk/source/lib/module.c	2004-11-30 01:01:43 UTC (rev 4008)
@@ -40,9 +40,12 @@
 	 */
 	handle = sys_dlopen(module_name, RTLD_LAZY);
 
+	/* This call should reset any possible non-fatal errors that 
+	   occured since last call to dl* functions */
+	error = sys_dlerror();
+
 	if(!handle) {
 		int level = is_probe ? 3 : 0;
-		error = sys_dlerror();
 		DEBUG(level, ("Error loading module '%s': %s\n", module_name, error ? error : ""));
 		return NT_STATUS_UNSUCCESSFUL;
 	}



More information about the samba-cvs mailing list