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

RE: [reSIProcate] Unsetting outbound proxy


Scott,

I'm fine with fall-through logic. Using unsetXXX unconditionally for 
originally unset parameters does not break the logic, but rather 
allows you to put Profile into _original_ state (which is considered 
to be correct, isn't it?) even if BaseProfile is not used.

I have not tried to set outbound proxy to empty string, since I 
noticed that different execution path will be used in this case, 
which at best will take more time, and at worst will assert (if 
not now, then possibly in future).

Therefore, now I use unconditional unset locally, and encourage you to 
put this change to the repository. I guess this applies not just for 
OutboundProxy, but for all parameters that could be checked with 
hasXXX methods.


On Thu, 29 Dec 2005, Scott Godin wrote:

> The point of the unset method is to allow fallthrough to the next 
> profile in the chain (ie. The profile passed in to the constructor).  
> If there is no profile to fallthrough to, then unset doesn't really 
> make sense.
> 
> Note:  For many profile settings is doesn't even make sense to 
> 'clear' a value - ie. The flags.
> 
> The best way to achieve what you want to to set the outbound proxy 
> to an empty string.  For outbound proxy - this means that it will 
> not be used.
> 
> Scott
> 
> PS.  I can understand how this would be confusing if you are not 
> using profile chaining.  Maybe we should consider renaming the 
> methods?  Or have a UseOutboundProxy setting...
> 
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> On Behalf Of Dmitry Semyonov
> Sent: Thursday, December 29, 2005 5:11 AM
> To: resiprocate-devel
> Subject: [reSIProcate] Unsetting outbound proxy
> 
> Hi.
> 
> Quoting Profile.hxx: "If you call an unsetXXXX method on an object 
> with a NULL BaseProfile it will have no effect."
> 
> Therefore, if I use just MasterProfile I can't unset outbound proxy 
> if it was set once.
> 
> I think unsetting should be allowed regardless of BaseProfile value 
> for all Profile members that are in 'unset' state initially.

-- 
...Bye..Dmitry.