Discussion:
[omniORB] Python interceptors - no way to get peer identity
Константин Ольховский
2010-05-25 19:38:18 UTC
Permalink
Hello.
Using C++ implementation one can get connection object and call
peeraddress and peeridentity.
But it is impossible to get it in python interceptors.
Is threre any sane way to do it?
May be a patch passing more arguments to python interceptor? Some dict
containing caller info or something...
--
Cheers,
Konstantin Olkhovskiy
Duncan Grisby
2010-06-01 17:42:49 UTC
Permalink
Post by Константин Ольховский
Using C++ implementation one can get connection object and call
peeraddress and peeridentity.
But it is impossible to get it in python interceptors.
Is threre any sane way to do it?
May be a patch passing more arguments to python interceptor? Some dict
containing caller info or something...
You're right that that information is not currently available to Python.
The main issue to making it available is mapping all the various C++ / C
data structures into Python.

For specific things, you could certainly extend the Python interceptors
to take an additional dictionary of information, or something similar.
If you do come up with such a patch, you should add an extra optional
argument to addServerReceiveRequest() to indicate that the function it
is given accepts the extra parameter. Otherwise, any change to the
expected function signature will break all existing code.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Konstantin Olkhovskiy
2010-06-03 23:14:29 UTC
Permalink
Actually i've made such a patch while waiting for answer. :)
But my current approach will break all existing omniORBpy code...
I will post it to dev mailing list as soon as some sane implementation is done.
Post by Duncan Grisby
Post by Константин Ольховский
Using C++ implementation one can get connection object and call
peeraddress and peeridentity.
But it is impossible to get it in python interceptors.
Is threre any sane way to do it?
May be a patch passing more arguments to python interceptor? Some dict
containing caller info or something...
You're right that that information is not currently available to Python.
The main issue to making it available is mapping all the various C++ / C
data structures into Python.
For specific things, you could certainly extend the Python interceptors
to take an additional dictionary of information, or something similar.
If you do come up with such a patch, you should add an extra optional
argument to addServerReceiveRequest() to indicate that the function it
is given accepts the extra parameter. Otherwise, any change to the
expected function signature will break all existing code.
Cheers,
Duncan.
--
?-- Duncan Grisby ? ? ? ? --
? -- http://www.grisby.org --
--
?????????? ??????????
??????? "?????"
Loading...