On 30.09.10 09:45, Антон Загорский wrote:
Hello.
I created AmSession via AmUAC::dial(..). What is a correct way to destroy
the session and finish a call?
dlg.bye() and setStopped() (in this order ;-)) should be fine. If it
crashes, you should try to get a core dump (ulimit -c unlimited) and
load it into GDB, or some other debugger of your choice.
setStopped() and dlg.bye() work fine, but when I added AmSessionEventHandler
to the AmSession instance SEMS was silently crashed with no error messages
in a log.
Which AmSessionEventHandler? do you mean with AmSession::addHandler() ?
Beware that the handlers are deleted in ~AmSession() if their "destroy"
flag is true:
AmSession::~AmSession()
{
for(vector<AmSessionEventHandler*>::iterator evh = ev_handlers.begin();
evh != ev_handlers.end(); evh++) {
if((*evh)->destroy)
delete *evh;
}
#ifdef WITH_ZRTP
AmZRTP::freeSession(zrtp_session);
#endif
DBG("AmSession destructor finished\n");
}
Regards
Raphael.
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems