From 8b8e2956e289044b6cb4b3713c07f651b1d77972 Mon Sep 17 00:00:00 2001 From: aymeric Date: Wed, 15 Oct 2008 16:23:21 +0000 Subject: [PATCH] The previous modification will not work on OS like macosx because version information is located before the extension. Thus, the previous code can load a plugins several times (file and links). git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@91 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/mediastreamer2/src/mscommon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);