[omniORB] FW: May not return NULL???

Pánczél Levente Levente.Panczel at compuworx.hu
Wed Nov 26 13:15:56 GMT 2003


Hello!

I have a function in an interface wich simply reads the name of an object instance:
string GetName();
which generates the C++ code
char *GetName();
My problem is that the name of an object is allowed to be _anything_ but the object might be in a state where Name is not initialised yet. To indicate this internally the server uses NULL pointers, so I'd really like this function to be lagally able to return NULL.
I do understand that this would be a problem, when I'm interfacing other languages, where there is no such external string value like a NULL pointer. Though it would be acceptable for me if in case of returning a NULL omniORB sent an exception making the client aware of the non-marshalable value. Now the case is that when omniORB is beginning to marshal the value it generates a segfault, causing not only the ORB subsystem of the server but the whole server to crash.
Please note that the last thing I would like to change is the IDL.
Thanks in advance.
Panczel, Levente




More information about the omniORB-list mailing list