core with unused OUT-structures/strings



Hi,

when i have OUT-structures, why is it necessary to initialize
(MYSTRUCT__alloc) these though i return an error to signal the client
not to use them ?

If i don't, ORBit2 cores when marshalling such structures by accessing
NULL.

Another problem is, if i have Strings in an OUT-structure, and even if
i initialize (alloc) the OUT-structure itself, i have to alloc all the
strings in the out-structure too or ORBit2 cores on strlen(NULL) when
marshalling.

I strace'd GIOP-messages of mico-orb for C++, and when not using the
out-variables (strings in structures), the returned strings are
empty strings here (len=0) and other values are as of memset(,0,).

Is it really necessary to initialize all strings in an OUT-structure
with CORBA_string_dup(""), even if they are not used for some reasons ?

If yes, a CORBA/ORBit-function which does this would be appreciated,
since it is not always known which strings are in an OUT structure,
due to some proprietary abstractions.

Why not default to the empty string if a string is NULL,
IMHO would be better than core ?

Thanks,
    haubi
-- 
Michael Haubenwallner                    SALOMON Automation GmbH
Forschung & Entwicklung                  A-8114 Friesach bei Graz
T +43 3127 200 308                       F +43 3127 200 22
mailto:michael.haubenwallner@salomon.at  http://www.salomon.at




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]