< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] compilation issues


Use this instead:

std::auto_ptr<ClientAuthManager> clientAuth(new ClientAuthManager(profile));

auto_ptr will delete whatever pointer it is wrapping when it goes out of
scope.

Jason


> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of Klaus
> Darilion
> Sent: Sunday, August 15, 2004 10:05 AM
> To: ReSiprocate-sipfoundry
> Subject: [reSIProcate] compilation issues
>
>
> Hi!
>
> I played around with resiprocate (revision 3260, Visual Studio.NET 2003)
> and had to change the following things to make resip work. Maybe you
> want to add this to HEAD to ease life for other newbies.
>
> 1. add the follwing files to the resiprocate project:
> StatisticsManager.cxx
> StatisticsManager.hxx
> StatisticsMessage.cxx
> StatisticsMessage.hxx
> TransportMessage.cxx
> TransportMessage.hxx
> StackThread.cxx
> StackThread.hxx
>
> 2. apply the following diff to basicRegister.cxx:
>
> Index: resiprocate/dum/test/basicRegister.cxx
> ===================================================================
> --- resiprocate/dum/test/basicRegister.cxx      (revision 3260)
> +++ resiprocate/dum/test/basicRegister.cxx      (working copy)
> @@ -56,6 +56,12 @@
>             done = true;
>         }
>
> +      virtual void onRemoved(ClientRegistrationHandle)
> +      {
> +          InfoLog ( << "Client::Removed: " );
> +          done = true;
> +      }
> +
>         bool done;
>         bool removing;
>   };
> @@ -98,15 +104,17 @@
>      Client client;
>      Profile profile;
>      ClientAuthManager clientAuth(profile);
> +   std::auto_ptr<ClientAuthManager> temp(&clientAuth);
>
>      DialogUsageManager clientDum(clientStack);
>      clientDum.setProfile(&profile);
>
>      clientDum.setClientRegistrationHandler(&client);
> -   clientDum.setClientAuthManager(&clientAuth);
> +//not allowed   clientDum.setClientAuthManager(&clientAuth);
> +   clientDum.setClientAuthManager(temp); // allowed
>      clientDum.getProfile()->setDefaultRegistrationTime(70);
>
> -   NameAddr from("sip:101@xxxxxxxxxxxxxxxxxxxxxxx");
> +   NameAddr from("sip:klaus3000@xxxxxxxxx");
>      clientDum.getProfile()->setDefaultFrom(from);
>
>
> Finally a question: if the basicRegister application terminates, it
> raises an error:
>    Debug Assertion Failed!
>    Program: basicRegister.exe
>    File: dbgdel.cpp
>    Line: 52
>    Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
>
> I'm not familiar with assertions. Who is guilty in this case? my
> configuration? the stack? the basicRegister application?
>
> regards,
> klaus
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>