[omniORB] Strange problems sending boolean sequences

Jeffrey Coffman jcoffman98 at yahoo.com
Mon Nov 28 16:26:43 GMT 2005


Hello,

I have been running into a strange problem when trying
to send a sequence of booleans.  I've narrowed the
problem down to the simplest example i could come up
with.  I have a simple IDL as follows.

module EXAMPLE1 {

    enum SimpleType {
        BooleanType,
        IntegerType,
        RealType,
        StringType
    };

    typedef sequence<boolean> BooleanList;
    typedef sequence<long long> IntegerList;
    typedef sequence<double> RealList;
    typedef sequence<string> StringList;

    union SimpleTypedValueArray switch ( SimpleType )
{
        case BooleanType : BooleanList booleanValues;
        case IntegerType : IntegerList integerValues;
        case RealType: RealList realValues;
        case StringType: StringList stringValues;
    };

    interface Test {
   void echoSimpleTypedValueArray(in                  
 SimpleTypedValueArray value);
    };   
};

I've created a test client and server application
based on example 3 in the OmniORB 4.0 users guide.  I
simply call echoSimpleTypedValueArray a few times with
different boolean values.  I've built this for both
linux x86 platform (using g++ 3.4) and my embedded
target linux PPC (using g++ 2.95).  When the server is
running on an x86 machine and the client on another
x86 machine the program behaves as I expect it to and
the values i send are correct.  However with the
server app running on x86 and the client on my
embedded PPC target, the boolean values are always
false, no matter what i set them too.

This only happens with booleans, if the union has
either real, integer or string types it works fine on
both the PPC and x86.  I'm stumped at this point and
hoping someone has an idea what might be the problem. 
Unfourtunatly I dont have a newer g++ version for my
embedded target to rule that out.


Heres the GIOP snippet from the client on PPC with
trace set at 40

 4749 4f50 0102 0000 0000 0065 0000 0004
GIOP.......e....
0300 0000 0000 000e 0000 000e fe9c 998b
................
4300 007d 9b00 0000 0000 2e22 0000 001a
C..}......."....
6563 686f 5369 6d70 6c65 5479 7065 6456
echoSimpleTypedV
616c 7565 4172 7261 7900 3020 0000 0001 alueArray.0
....
0000 0001 0000 000c 0000 0000 0001 0001
................
0001 0109 2e2e 2e2e 0000 0000 0000 0001
................
00   


The code I used to generate this (minus all the orb
setup)

    EXAMPLE1::Test_var testref =     
EXAMPLE1::Test::_narrow(obj);

    EXAMPLE1::SimpleTypedValueArray simpleValue;
    EXAMPLE1::BooleanList boolList;
    boolList.length(1);
    boolList[0] = CORBA::Boolean(1);
    simpleValue.booleanValues(boolList);
    testref->echoSimpleTypedValueArray(simpleValue);

Any ideas?  

Thanks,

Jeff
 


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/



More information about the omniORB-list mailing list