gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21748 - Extractor/src/main


From: gnunet
Subject: [GNUnet-SVN] r21748 - Extractor/src/main
Date: Mon, 4 Jun 2012 00:31:06 +0200

Author: grothoff
Date: 2012-06-04 00:31:06 +0200 (Mon, 04 Jun 2012)
New Revision: 21748

Modified:
   Extractor/src/main/extractor_plugins.c
   Extractor/src/main/extractor_plugpath.c
Log:
Dear libextractor maintainers,

With the arrival of multiarch in Debian, the standard library path changes 
(e.g. /usr/lib/x86_64-linux-gnu/ for amd64). The fact that it contains an 
underscore causes extract to fail to load its plugins, see [1].

Fortunately, Harun Trefry kindly provided a patch against the last revision of 
you SVN that you'll find attached. Would you consider to include it ?

Cheers,
Bertrand

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675063 



Modified: Extractor/src/main/extractor_plugins.c
===================================================================
--- Extractor/src/main/extractor_plugins.c      2012-06-03 19:36:09 UTC (rev 
21747)
+++ Extractor/src/main/extractor_plugins.c      2012-06-03 22:31:06 UTC (rev 
21748)
@@ -71,14 +71,14 @@
   const char *(*opt_fun)(void);
 
   if (NULL != options) *options = NULL;
-  sym_name = strstr (prefix, "_");
+  sym_name = strrchr (prefix, '_');
   if (sym_name == NULL)
     return NULL;
   sym_name++;
   sym = strdup (sym_name);
   if (sym == NULL)
     return NULL;
-  dot = strstr (sym, ".");
+  dot = strchr (sym, '.');
   if (dot != NULL)
     *dot = '\0';
   name = malloc(strlen(sym) + strlen(template) + 1);

Modified: Extractor/src/main/extractor_plugpath.c
===================================================================
--- Extractor/src/main/extractor_plugpath.c     2012-06-03 19:36:09 UTC (rev 
21747)
+++ Extractor/src/main/extractor_plugpath.c     2012-06-03 22:31:06 UTC (rev 
21748)
@@ -407,7 +407,7 @@
       if ( (NULL != (la = strstr (ent->d_name, ".la"))) &&
           (la[3] == '\0') )
        continue; /* only load '.so' and '.dll' */
-      sym_name = strstr (ent->d_name, "_");
+      sym_name = strrchr (ent->d_name, '_');
       if (sym_name == NULL)
        continue;       
       sym_name++;
@@ -417,7 +417,7 @@
          CLOSEDIR (dir);
          return;
        }
-      dot = strstr (sym, ".");
+      dot = strchr (sym, '.');
       if (dot != NULL)
        *dot = '\0';
       if (0 == strcmp (sym, sc->short_name))
@@ -439,7 +439,6 @@
 }
 
 
-
 /**
  * Given a short name of a library (i.e. "mime"), find
  * the full path of the respective plugin.
@@ -457,9 +456,6 @@
 }
 
 
-
-
-
 /**
  * Load all plugins from the given directory.
  * 
@@ -491,7 +487,7 @@
             (la[2] == '\0')) )
        continue; /* only load '.so' and '.dll' */
 
-      sym_name = strstr (ent->d_name, "_");
+      sym_name = strrchr (ent->d_name, '_');
       if (sym_name == NULL)
        continue;
       sym_name++;
@@ -501,7 +497,7 @@
          closedir (dir);
          return;
        }
-      dot = strstr (sym, ".");
+      dot = strchr (sym, '.');
       if (dot != NULL)
        *dot = '\0';
 #if DEBUG > 1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]