Explorar el Código

fix loader output

David Rose hace 22 años
padre
commit
e534118821
Se han modificado 2 ficheros con 9 adiciones y 6 borrados
  1. 6 4
      panda/src/pgraph/loader.cxx
  2. 3 2
      panda/src/pgraph/loaderFileTypeRegistry.cxx

+ 6 - 4
panda/src/pgraph/loader.cxx

@@ -325,13 +325,15 @@ load_file_types() {
 
         if (words.size() == 1) {
           // Exactly one word: load the named library immediately.
-          Filename dlname = Filename::dso_filename("lib" + words[0] + ".so");
+          string name = words[0];
+          Filename dlname = Filename::dso_filename("lib" + name + ".so");
           loader_cat.info()
-            << "loading file type module: " << dlname.to_os_specific() << endl;
+            << "loading file type module: " << name << endl;
           void *tmp = load_dso(dlname);
           if (tmp == (void *)NULL) {
-            loader_cat.info()
-              << "Unable to load: " << load_dso_error() << endl;
+            loader_cat.warning()
+              << "Unable to load " << dlname.to_os_specific()
+              << ": " << load_dso_error() << endl;
           }
           
         } else if (words.size() > 1) {

+ 3 - 2
panda/src/pgraph/loaderFileTypeRegistry.cxx

@@ -103,11 +103,12 @@ get_type_from_extension(const string &extension) {
       // that this is a race condition if we support threaded loading;
       // this whole function needs to be protected from multiple
       // entry.
-      Filename dlname = Filename::dso_filename("lib" + (*di).second + ".so");
+      string name = (*di).second;
+      Filename dlname = Filename::dso_filename("lib" + name + ".so");
       _deferred_types.erase(di);
 
       loader_cat->info()
-        << "loading file type module: " << (*di).second << endl;
+        << "loading file type module: " << name << endl;
       void *tmp = load_dso(dlname);
       if (tmp == (void *)NULL) {
         loader_cat->warning()