Marc Chaland wrote on 03/13/2008 04:59 PM this:
From Ronald Aigner:
When you add the error_function_server attribute to the respective interface, does the generated code for the reply function contain code that looks something like this?
OK, I've tried to put this on an inherited interface. If I put it on the right interface, it's fine :).
However, into error_function, I don't know how to get info on destination thread and call which generated error. Before reply call, I set a global variable to 0. error_function sets it to 1 if it is called. After reply call, I check this variable. If set to 1, I consider destination thread dead. Is there another way to do this less trickly ?
Before calling the reply function you could set the partner member of the CORBA_Server_Environment parameter. This environment is passed to the error function. In the error function you could then check the partner member.
Or, there is a user_data member in the CORBA_Server_Environment, which is of type void*. You could let it point to whatever data you need in the error function.
Regards, Ron.