linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] Re: mediastreamer plugins were not loaded


From: Luc Deschenaux
Subject: [Linphone-developers] Re: mediastreamer plugins were not loaded
Date: Sat, 11 Oct 2008 03:25:20 +0200

It is caused by xfs default mount options.

But it is better to add 'DT_LNK' to the test :)

Index: mediastreamer2/src/mscommon.c
===================================================================
--- mediastreamer2/src/mscommon.c       (révision 72)
+++ mediastreamer2/src/mscommon.c       (copie de travail)
@@ -346,7 +346,7 @@
                return -1;
        }
        while( (de=readdir(ds))!=NULL){
-               if (de->d_type==DT_REG && strstr(de->d_name,PLUGINS_EXT)!=NULL){
+               if ((de->d_type==DT_REG || de->d_type==DT_LNK  || 
de->d_type==DT_UNKNOWN) && 
strstr(de->d_name,PLUGINS_EXT)==de->d_name+strlen(de->d_name)-strlen(PLUGINS_EXT)){
                        void *handle;
                        fullpath=ms_strdup_printf("%s/%s",dir,de->d_name);
                        ms_message("Loading plugin %s...",fullpath);




Le vendredi 10 octobre 2008 à 07:27 +0200, Luc Deschenaux a écrit :
> Hi !
> 
> plugins could not be loaded: de->d_type was equal to DT_UNKNOWN for libraries 
> and links
> 
> (maybe because the directory was on xfs filesystem ?)
> 
> without the extra test for checking if the filename is ending in ".so",
> all the symbolic links were loaded too ..
> 
> -> was the plugin really loaded many times ? anyway..
>  
> with this patch, libmsx264.so is now loaded from the xfs directory i did 
> install it..
> 
> 
> Index: mediastreamer2/src/mscommon.c
> ===================================================================
> --- mediastreamer2/src/mscommon.c       (révision 72)
> +++ mediastreamer2/src/mscommon.c       (copie de travail)
> @@ -346,7 +346,7 @@
>                 return -1;
>         }
>         while( (de=readdir(ds))!=NULL){
> -               if (de->d_type==DT_REG && 
> strstr(de->d_name,PLUGINS_EXT)!=NULL){
> +               if ((de->d_type==DT_REG || de->d_type==DT_UNKNOWN) && 
> strstr(de->d_name,PLUGINS_EXT)==de->d_name+strlen(de->d_name)-strlen(PLUGINS_EXT)){
>                         void *handle;
>                         fullpath=ms_strdup_printf("%s/%s",dir,de->d_name);
>                         ms_message("Loading plugin %s...",fullpath);
> 





reply via email to

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