[omniORB] sequence_var return passing
Tom Kelly
thomas.kelly@queens.oxford.ac.uk
Fri, 10 Sep 1999 22:45:14 +0100 (BST)
I have a problem sending a zero length sequence of octets through a return
type. Consider the following source as a testcase:
wib.idl:
typedef sequence<octet> octetSequence;
interface wib{
octetSequence fib();
};
------
wib_i.cc:
#include "wib.hh"
class wib_i : public virtual _sk_wib{
public:
wib_i(){}
virtual ~wib_i(){}
virtual octetSequence * fib(){
octetSequence_var dummy(0);
return dummy._retn();}
};
------
If I now have on the client side:
octetSequence_var dummy(0);
wib_var objref = ... // get object reference somehow
dummy = objref->fib();
This causes the server to die with a segmentation fault.
Collocating the client and server solves the problem.
Am I allowed to pass back a zero length (is that the same as null)
sequence of octets?
Thanks in advance,
Tom
p.s. platform: Redhat 6.0 with errata patches on i686 and omniORB2.8pre2