Re: [Opalvoip-devel] clearing call and PSyncPoint
Brought to you by:
csoutheren,
rjongbloed
From: Robert J. <ro...@vo...> - 2013-04-27 17:55:56
|
I had a quick look at the code, and I can't see any obvious reason why this would not work. Your usage is fine, though there is no need to put the PSyncPoint on the heap, could be a local variable too. Log file? *Robert Jongbloed* OPAL/OpenH323/PTLib Architect and Co-founder. /Traveling, so email responses may be slow!/ On 26/04/13 10:48 PM, Alexander Sbitnev wrote: > Something came up with latest Eridani. > I've modified simpleopal as below: > > void MyManager::HangupCurrentCall() > { > PString & token = currentCallToken.IsEmpty() ? heldCallToken : > currentCallToken; > > PSafePtr<OpalCall> call = FindCallWithLock(token); > if (call == NULL) > cout << "No call to hang up!\n"; > else { > cout << "Clearing call " << *call << endl; > PSyncPoint* p = new PSyncPoint(); > call->Clear(OpalConnection::EndedByLocalUser, p); > > cout << "D1" << endl; > p->Wait(); > cout << "D2" << endl; > delete p, p = 0; > > token.MakeEmpty(); > } > } > > This way hangup not working and Wait() call deadlocking. > Do i use PSyncPoint wrong? > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > > > _______________________________________________ > Opalvoip-devel mailing list > Opa...@li... > https://lists.sourceforge.net/lists/listinfo/opalvoip-devel |