Hi Elvin,

Largely, the clases in the Env object are not public and should not be
used by plugin writes (never mind that they are and we have a special
category of private but made accessible classes). Do, given that you only
over-ride a small section of ofs classes; would it work if I gae you a
class whechi would look similar to the ofs class and could be used as a
wrapper to that class bt allow you easily over-ride the methods that you
want. It would basically be a class with all of the XrdSfs methods but
would invoke the buil-in XrdOfs method unless you over-ride it. From what
you say that would work for you and, in fact, you could even write one
like that.

Andy

On Sat, 15 Nov 2014, Elvin Sindrilaru wrote:

> Hi Andy,
>
> This will not work for us as it would mean rewriting most of the ofs plugin and more over we only use a limited set of functionality from the default ofs - such as this part of calling the Configure method to parse the default configuration options.
>
> But generally speaking, wouldn't it be desirable for someone who implements their own OFS standalone plugin to have access during the configuration step to the following components set in XrdXrootdConfig:
>
> myEnv.PutPtr("XrdInet*", (void *)(pi->NetTCP));
> myEnv.PutPtr("XrdNetIF*", (void *)(&(pi->NetTCP->netIF)));
> myEnv.PutPtr("XrdSecGetProtocol*", (void *)secGetProt);
> myEnv.PutPtr("XrdScheduler*", Sched);
>
> Because the way the XrdSfsGetFileSystem entry point is currently defined this is not possible ... unless I'm missing something.
>
> Another option would be to drop the check done in XrdOfsConfig.cc:139 since myIF seems not be used during the configure step of the default OFS and then set it when the EnvInfo() method of the OFS is called. But this might have some other side effects as the EnvInfo is 0 while initialising XrdConfigPI & others. I will have a closer look on Monday and try it out and let you know the outcome ...
>
> Cheers,
> Elvin
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/xrootd/xrootd/issues/161#issuecomment-63183230


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1