Skip to content

Commit

Permalink
[XrdCl] Make client plug-ins strictly version controled and rename th…
Browse files Browse the repository at this point in the history
…e plugin symbol to XrdClGetPlugIn
  • Loading branch information
ljanyst committed Jan 31, 2014
1 parent 8b833a9 commit 3f16fd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/XrdCl/XrdClPlugInManager.cc
Expand Up @@ -36,6 +36,8 @@
#include <string>
#include <algorithm>

XrdVERSIONINFOREF( XrdCl );

namespace XrdCl
{
//----------------------------------------------------------------------------
Expand Down Expand Up @@ -330,10 +332,11 @@ namespace XrdCl

char errorBuff[1024];
XrdSysPlugin *pgHandler = new XrdSysPlugin( errorBuff, 1024,
lib.c_str(), lib.c_str() );
lib.c_str(), lib.c_str(),
&XrdVERSIONINFOVAR( XrdCl ) );

PlugInFunc_t pgFunc= (PlugInFunc_t)pgHandler->getPlugin(
"GetClientPlugInFactory", false, false );
"XrdClGetPlugIn", false, false );

if( !pgFunc )
{
Expand Down
2 changes: 1 addition & 1 deletion src/XrdCl/XrdClPlugInManager.hh
Expand Up @@ -101,7 +101,7 @@ namespace XrdCl
//! The plug-in library must implement the following method:
//! extern "C"
//! {
//! void *GetClientPlugInFactory()
//! void *XrdClGetPlugIn()
//! {
//! return __your_plug_in_factory__;
//! }
Expand Down
3 changes: 2 additions & 1 deletion src/XrdVersionPlugin.hh
Expand Up @@ -112,6 +112,7 @@
XrdVERSIONPLUGIN_Rule(DoNotChk, 4, 0, XrdSecProtocolunixInit )\
XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSecProtocolunixObject )\
XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdSfsGetFileSystem )\
XrdVERSIONPLUGIN_Rule(Required, 0, 0, XrdClGetMonitor )\
XrdVERSIONPLUGIN_Rule(Required, 3, 0, XrdClGetMonitor )\
XrdVERSIONPLUGIN_Rule(Required, 4, 0, XrdClGetPlugIn )\
{ 0, 0, 0, 0}
#endif

0 comments on commit 3f16fd5

Please sign in to comment.