diff --git a/linphone/mediastreamer2/src/mscommon.c b/linphone/mediastreamer2/src/mscommon.c index 34cb3dbf6..4f185399d 100644 --- a/linphone/mediastreamer2/src/mscommon.c +++ b/linphone/mediastreamer2/src/mscommon.c @@ -346,8 +346,8 @@ int ms_load_plugins(const char *dir){ return -1; } while( (de=readdir(ds))!=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) ) { + if ((de->d_type==DT_REG && strstr(de->d_name,PLUGINS_EXT)!=NULL) + || (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);