Commit 8b8e2956 authored by aymeric's avatar aymeric

The previous modification will not work on OS like macosx because version...

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
parent b6f2cefc
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment